Col

Layout & Structure
stable

Responsive flex column that spans 1–12 grid tracks. Supports per-breakpoint span, offset, order and alignment overrides via props.

Structure

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

Anatomy of OrigamColSchematic of Col with root and content slot. #default slot 1 origam-col
Anatomy of <origam-col> — 1 root element with a default slot. BEM size/offset/order modifiers are generated dynamically from props.
1.origam-col
Root element (defaults to <div>). Responsive modifiers such as origam-col--6, origam-col--md-4 and origam-col--offset-2 are generated from props.

API

Props

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.

cols
Number of columns to span (1–12) or "auto". Applied at all breakpoints unless overridden.
Column span override at the sm breakpoint (≥ 600 px).
Column span override at the md breakpoint (≥ 960 px).
Column span override at the lg breakpoint (≥ 1280 px).
Column span override at the xl breakpoint (≥ 1920 px).
Column span override at the xxl breakpoint (≥ 2560 px).
Left margin offset in columns (1–11). Applied at all breakpoints.
Offset override at the sm breakpoint.
Offset override at the md breakpoint.
Offset override at the lg breakpoint.
Offset override at the xl breakpoint.
Offset override at the xxl breakpoint.
order
number
CSS order value. Also accepts the named values "first" (-9999) and "last" (9999).
orderSm
number
Order override at the sm breakpoint.
orderMd
number
Order override at the md breakpoint.
orderLg
number
Order override at the lg breakpoint.
orderXl
number
Order override at the xl breakpoint.
orderXxl
number
Order override at the xxl breakpoint.
color
Foreground color for content inside the column.
bgColor
Background color of the column.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
tag
string
'div'
HTML element rendered at the root. Defaults to <div>.
padding
boolean | number | string
paddingTop
boolean | number | string
paddingLeft
boolean | number | string
paddingBottom
boolean | number | string
paddingRight
boolean | number | string
paddingBlock
boolean | number | string
paddingInline
boolean | number | string
paddingInlineStart
boolean | number | string
paddingInlineEnd
boolean | number | string
paddingBlockStart
boolean | number | string
paddingBlockEnd
boolean | number | string
margin
boolean | number | string
marginTop
boolean | number | string
marginLeft
boolean | number | string
marginBottom
boolean | number | string
marginRight
boolean | number | string
marginBlock
boolean | number | string
marginInline
boolean | number | string
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
borderTop
boolean | number | string
borderLeft
boolean | number | string
borderBottom
boolean | number | string
borderRight
boolean | number | string
borderBlock
boolean | number | string
borderInline
boolean | number | string
borderInlineStart
boolean | number | string
borderInlineEnd
boolean | number | string
borderBlockStart
boolean | number | string
borderBlockEnd
boolean | number | string
borderColor
string
borderStyle
string
borderTopColor
TColor
borderRightColor
TColor
borderBottomColor
TColor
borderLeftColor
TColor
borderInlineStartColor
TColor
borderInlineEndColor
TColor
borderBlockStartColor
TColor
borderBlockEndColor
TColor
align
TAlign
alignSm
TAlign
alignMd
TAlign
alignLg
TAlign
alignXl
TAlign
alignXxl
TAlign

API

Slots

Emplacements de contenu exposés par ce composant.

#default
Column content. Typically other layout or content components.

API

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props to a child component.
Ref<string>
Reactive CSS string generated by useStyle.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet into the document.
() => void
Removes the injected style sheet.
Ref<boolean>
True once the style sheet has been injected into the DOM.

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

Default column width before breakpoint modifiers are applied.
Flex basis. Overridden per span modifier to calc(100% / (12 / n)).
flex-grow value. Set to 0 for auto columns.
Horizontal gutter — start side. Matches the Row gutter half-width.
Horizontal gutter — end side.

Inclusion

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Notes

  • Col renders as <div> by default. Use the tag prop to render a semantic element (e.g. <article>, <section>) when appropriate for the content.

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Basic 12-column grid

vue

Responsive breakpoints

vue

Écosystème

Famille

Composants du même dossier qui partagent les conventions et se composent souvent ensemble.