Skip to content

Component

Divider

A FormaUI divider — a thin rule for separating content, delegating to Material 3's HorizontalDivider / VerticalDivider.

dev.formaui.components.divider

HorizontalVertical

Preview

This toggle is site chrome only — the preview has its own light/dark switch inside.

Live preview

Live preview — ~37 MB development build

Usage

Column(verticalArrangement = Arrangement.spacedBy(FormaTheme.spacing.md)) {
    Text("Above")
    FormaDivider()
    Text("Below")
    Row(modifier = Modifier.height(FormaTheme.spacing.xl)) {
        Text("Left")
        FormaDivider(orientation = FormaDividerOrientation.Vertical)
        Text("Right")
    }
}

FormaDivider

Thin horizontal or vertical rule for separating content, chosen by the orientation parameter.

modifierTypeModifierDefaultModifierDescriptionthe Modifier applied to the divider.
orientationTypeFormaDividerOrientationDefaultFormaDividerOrientation.HorizontalDescriptionwhether the rule runs horizontally or vertically (defaults to FormaDividerOrientation.Horizontal).
thicknessTypeDpDefaultDividerDefaults.ThicknessDescriptionthe stroke thickness (defaults to Material 3's hairline DividerDefaults.Thickness).
colorTypeColorDefaultDividerDefaults.colorDescriptionthe stroke color (defaults to Material 3's DividerDefaults.color).

Supporting API

FormaDividerOrientationenum
The direction the divider runs: Horizontal, Vertical.

Accessibility

Purely decorative: a divider carries no semantics and does not need a content description.