Col
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.
<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 asorigam-col--6,origam-col--md-4andorigam-col--offset-2are 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.
- sm
- Column span override at the sm breakpoint (≥ 600 px).
- md
- Column span override at the md breakpoint (≥ 960 px).
- lg
- Column span override at the lg breakpoint (≥ 1280 px).
- xl
- Column span override at the xl breakpoint (≥ 1920 px).
- xxl
- Column span override at the xxl breakpoint (≥ 2560 px).
- offset
- Left margin offset in columns (1–11). Applied at all breakpoints.
- offsetSm
- Offset override at the sm breakpoint.
- offsetMd
- Offset override at the md breakpoint.
- offsetLg
- Offset override at the lg breakpoint.
- offsetXl
- Offset override at the xl breakpoint.
- offsetXxl
- Offset override at the xxl breakpoint.
- ordernumber
- CSS order value. Also accepts the named values "first" (-9999) and "last" (9999).
- orderSmnumber
- Order override at the sm breakpoint.
- orderMdnumber
- Order override at the md breakpoint.
- orderLgnumber
- Order override at the lg breakpoint.
- orderXlnumber
- Order override at the xl breakpoint.
- orderXxlnumber
- Order override at the xxl breakpoint.
- color
- Foreground color for content inside the column.
- bgColor
- Background color of the column.
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- tagstring'div'
- HTML element rendered at the root. Defaults to <div>.
- paddingboolean | number | string
- paddingTopboolean | number | string
- paddingLeftboolean | number | string
- paddingBottomboolean | number | string
- paddingRightboolean | number | string
- paddingBlockboolean | number | string
- paddingInlineboolean | number | string
- paddingInlineStartboolean | number | string
- paddingInlineEndboolean | number | string
- paddingBlockStartboolean | number | string
- paddingBlockEndboolean | number | string
- marginboolean | number | string
- marginTopboolean | number | string
- marginLeftboolean | number | string
- marginBottomboolean | number | string
- marginRightboolean | number | string
- marginBlockboolean | number | string
- marginInlineboolean | number | string
- marginInlineStartboolean | number | string
- marginInlineEndboolean | number | string
- marginBlockStartboolean | number | string
- marginBlockEndboolean | number | string
- borderboolean | number | string | TDirectionBoth | Array<TDirectionBoth>
- borderTopboolean | number | string
- borderLeftboolean | number | string
- borderBottomboolean | number | string
- borderRightboolean | number | string
- borderBlockboolean | number | string
- borderInlineboolean | number | string
- borderInlineStartboolean | number | string
- borderInlineEndboolean | number | string
- borderBlockStartboolean | number | string
- borderBlockEndboolean | number | string
- borderColorstring
- borderStylestring
- borderTopColorTColor
- borderRightColorTColor
- borderBottomColorTColor
- borderLeftColorTColor
- borderInlineStartColorTColor
- borderInlineEndColorTColor
- borderBlockStartColorTColor
- borderBlockEndColorTColor
- alignTAlign
- alignSmTAlign
- alignMdTAlign
- alignLgTAlign
- alignXlTAlign
- alignXxlTAlign
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
Responsive breakpoints
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.