Row
Horizontal flex row that wraps Col children with configurable gutters, alignment, justify and direction. Sub-component of the Grids family.
Structure
Anatomie
Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.
<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
Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et 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
Emplacements de contenu exposés par ce composant.
- #default
- Col children and any other content placed inside the row.
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>
- 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.
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.
- 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
Accessibilité
Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.
Notes
- Row renders a plain div by default. For sectioning content, override the tag prop with a semantic element such as section or main.
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 row with two columns
Alignment and justify
Column direction
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.