Col
Responsive flex column that spans 1–12 grid tracks. Supports per-breakpoint span, offset, order and alignment overrides via props.
Structure
Anatomy
Visual breakdown of the component's internal structure with BEM class call-outs.
<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
All props accepted by this component, with their type, default value and 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
Content slots exposed by this component.
- #default
- Column content. Typically other layout or content components.
API
Exposed members
Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.
- <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.
Customisation
CSS variables
CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.
- 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
Accessibility
ARIA roles, keyboard navigation and focus management. Sourced from the real component template.
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.
Interactive
Playground
Edit props live and see the component update in real time. The generated code snippet updates as you change values.
Rendering the live preview…
Usage
Examples
Ready-to-paste code snippets for your templates.
Basic 12-column grid
Responsive breakpoints
Ecosystem
Family
Components from the same folder that share conventions and often compose together.