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

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

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

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.
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

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

vue

Responsive breakpoints

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.