Row

Layout & Structure
stable

Horizontal flex row that wraps Col children with configurable gutters, alignment, justify and direction. Sub-component of the Grids family.

Structure

Anatomy

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

Anatomy of OrigamRowSchematic of the Row component with 3 numbered parts. Col slot Col slot Col slot 1 2 3
Anatomy of <origam-row> — 3 parts: root flex container ①, Col children ②, density-driven margin adjustment ③.
1.origam-row
Root element. Renders as a flex container (display: flex, flex-wrap: wrap). Tag is configurable via the tag prop.
2.origam-row (Col children)
Direct Col children receive gutter via negative margin on the row and padding on each Col.
3.origam-row--density-{compact|default|comfortable}
Density modifier class. Adjusts --origam-row---density offset on block and inline margins.

API

Props

All props accepted by this component, with their type, default value and description.

gutters
TRowGutter
Gap between Col children. Accepts a CSS length or a number (converted to px).
direction
'row'
Flex direction of the row: row, row-reverse, column, column-reverse.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
tag
string
'div'
HTML element rendered at the root. Default is 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>
false
Applies a border to the row. Pass true for the default border or a CSS shorthand.
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
Override border color.
borderStyle
string
Override border style (solid, dashed, dotted…).
borderTopColor
TColor
borderRightColor
TColor
borderBottomColor
TColor
borderLeftColor
TColor
borderInlineStartColor
TColor
borderInlineEndColor
TColor
borderBlockStartColor
TColor
borderBlockEndColor
TColor
color
Foreground color applied to the row element.
bgColor
Background color applied to the row element.
density
'default'
Controls margin density offset applied to block and inline margins. compact: -8px, comfortable: +8px.
align
TAlign
'stretch'
Aligns Col children along the cross axis (align-items). Supports per-breakpoint variants: alignSm, alignMd, alignLg, alignXl, alignXxl.
alignSm
TAlign
alignMd
TAlign
alignLg
TAlign
alignXl
TAlign
alignXxl
TAlign
justify
TJustify
'start'
Distributes Col children along the main axis (justify-content). Supports per-breakpoint variants: justifySm, justifyMd, justifyLg, justifyXl, justifyXxl.
justifySm
TJustify
justifyMd
TJustify
justifyLg
TJustify
justifyXl
TJustify
justifyXxl
TJustify

API

Slots

Content slots exposed by this component.

#default
Col children and any other content placed inside the row.

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>
Forwards a filtered subset of props to child components.
Ref<string>
Reactive CSS string generated by useStyle from computed row styles.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet. Called automatically on mount.
() => void
Removes the injected style sheet. Called automatically on unmount.
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.

Display value for the row (always flex).
Flex direction. Overridden by direction prop class.
Wrap mode. Default: wrap (columns stack on overflow).
Flex shorthand applied to the row itself.
Cross-axis alignment. Overridden by align / alignSm … alignXxl classes.
Main-axis distribution. Overridden by justify / justifySm … justifyXxl classes.
Default negative block-start margin that creates gutters with Col padding.
Default negative inline-start margin.
Density offset added to block and inline margins. compact: −8px, comfortable: +8px.
Border width when the border modifier class is active.

Inclusion

Accessibility

ARIA roles, keyboard navigation and focus management. Sourced from the real component template.

Notes

  • Row renders a plain div by default. For sectioning content, override the tag prop with a semantic element such as section or main.

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 row with two columns

vue

Alignment and justify

vue

Column direction

vue

Ecosystem

Family

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