Row
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.
<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.
- guttersTRowGutter
- Gap between Col children. Accepts a CSS length or a number (converted to px).
- Flex direction of the row: row, row-reverse, column, column-reverse.
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- tagstring'div'
- HTML element rendered at the root. Default is 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>false
- Applies a border to the row. Pass true for the default border or a CSS shorthand.
- 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
- Override border color.
- borderStylestring
- Override border style (solid, dashed, dotted…).
- borderTopColorTColor
- borderRightColorTColor
- borderBottomColorTColor
- borderLeftColorTColor
- borderInlineStartColorTColor
- borderInlineEndColorTColor
- borderBlockStartColorTColor
- borderBlockEndColorTColor
- color
- Foreground color applied to the row element.
- bgColor
- Background color applied to the row element.
- Controls margin density offset applied to block and inline margins. compact: -8px, comfortable: +8px.
- alignTAlign'stretch'
- Aligns Col children along the cross axis (align-items). Supports per-breakpoint variants: alignSm, alignMd, alignLg, alignXl, alignXxl.
- alignSmTAlign
- alignMdTAlign
- alignLgTAlign
- alignXlTAlign
- alignXxlTAlign
- justifyTJustify'start'
- Distributes Col children along the main axis (justify-content). Supports per-breakpoint variants: justifySm, justifyMd, justifyLg, justifyXl, justifyXxl.
- justifySmTJustify
- justifyMdTJustify
- justifyLgTJustify
- justifyXlTJustify
- justifyXxlTJustify
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
Alignment and justify
Column direction
Ecosystem
Family
Components from the same folder that share conventions and often compose together.