Divider

Layout & Structure
stable

Horizontal or vertical separator rendered as a semantic <hr> with color, thickness and inset support.

Structure

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

Anatomy of OrigamDividerSchematic of the Divider component with 3 numbered parts. HORIZONTAL 1 VERTICAL 2 Rendered as <hr> — native HTML separator with role="separator"
Anatomy of <origam-divider>. Horizontal ① is full-width; vertical ② is inline-flex with height: auto. Both render as a native <hr>.
1.origam-divider
Root <hr> element. In horizontal mode: display: block; flex: 1 1 100%. aria-orientation="horizontal".
2.origam-divider--vertical
Vertical variant modifier. Switches to display: inline-flex, height: auto, align-self: stretch. aria-orientation="vertical".
3.origam-divider--inset
Inset modifier. Adds margin-inline-start so the line aligns with list item content.

API

Props

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.

inset
boolean
false
Adds a margin-inline-start indent so the divider aligns with list content.
length
number | string
Constrains the divider length. Horizontal → max-width; vertical → max-height. Accepts CSS lengths or numbers (px).
thickness
number | string
Overrides the border width (stroke thickness) of the divider.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
color
Intent or custom color for the divider line.
bgColor
Background color override. Useful for styled label dividers.
margin
boolean | number | string
Shorthand margin applied to all sides.
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
direction
TDirection
'horizontal'
Controls the divider orientation. Horizontal renders as a full-width line; vertical as an inline inline block.

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>
Utility to forward a filtered subset of props to a child component.
Ref<string>
Reactive CSS string generated by useStyle from the computed dividerStyles.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet into the document. 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.

Global opacity of the divider line. Token: {opacity.100} resolves to 1; the component overrides to 0.12 by default in SCSS.
Stroke thickness for the horizontal divider. Overridden by the thickness prop.
Stroke thickness for the vertical divider. Overridden by the thickness prop.
Maximum width for horizontal dividers. Set by the length prop.
Maximum height for vertical dividers. Set by the length prop.
Leading indent applied when inset=true.

Inclusion

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Rôles ARIA

separator

Notes

  • Renders as a native <hr> element which has an implicit role="separator". The aria-orientation attribute matches the direction prop (horizontal or vertical).
  • When used purely for visual decoration, pass role="presentation" via attrs to remove the element from the accessibility tree.

Fondation

Design tokens

Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.

Source
color
var(--origam-color__border---subtle)
Default divider color. References the subtle border semantic token.
dimension
var(--origam-border__width---thin)
Default stroke thickness. Overridden by the thickness prop.
number
var(--origam-opacity---100)
Token default opacity (1). SCSS overrides to 0.12 for a subtle separator effect.
dimension
var(--origam-space---0)
Default block margin (0). Use the margin prop for spacing.

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.

Horizontal divider

vue

Vertical divider

vue

Colored & inset

vue