Package-level declarations

Dividers The Divider component provides a thin, unobtrusive line that separates and distinguishes sections of content to reinforce visual hierarchy.
A few common uses are: Separating sections on a page. Creating a visual contrast between 2 sides of a page.

Dividers are typically placed throughout your UI in places like:

  • Lists

  • Forms

  • Cards

  • Toolbars

  • Dialogs

Light
Dark

Horizontal Divider

Column {
Title()
HorizontalDivider()
Description()
}

Horizontal Divider with Label

HorizontalDivider(
intent = DividerIntent.Outline,
label = "Label",
labelHorizontalAlignment = LabelHorizontalAlignment.Center
)

Vertical Divider

Row {
VerticalDivider()
}

Vertical Divider with Label

VerticalDivider(
intent = DividerIntent.OutlineHigh,
label = "Label",
labelVerticalAlignment = LabelVerticalAlignment.Center
)

Types

Link copied to clipboard

Intent on the divider that will affect the background of the divider line. Use OutlineHigh to get a higher contrast if needed.

Link copied to clipboard

LabelHorizontalAlignment is used to define the horizontal alignment of the label in the divider. Alignment can be visible when Label is activated

Link copied to clipboard

LabelVerticalAlignment is used to define the vertical alignment of the label in the divider. Alignment can be visible when Label is activated

Functions

Link copied to clipboard
fun HorizontalDivider(modifier: Modifier = Modifier, intent: DividerIntent = DividerIntent.Outline, labelHorizontalAlignment: LabelHorizontalAlignment = LabelHorizontalAlignment.Center, label: @Composable BoxScope.() -> Unit? = null)

HorizontalDivider Component. A divider is a thin line that groups content in lists and layouts.

Link copied to clipboard
fun VerticalDivider(modifier: Modifier = Modifier, intent: DividerIntent = DividerIntent.Outline, labelVerticalAlignment: LabelVerticalAlignment = LabelVerticalAlignment.Center, label: @Composable BoxScope.() -> Unit? = null)

VerticalDivider Component. A divider is a thin line that groups content in lists and layouts.