Divider

A thin line that groups content in lists and layouts.

When to use

Use a divider to separate related items inside a surface. Prefer spacing or a change of container color when a divider is not needed. Dividers use the outlineVariant color role.

Playground

The interactive page has a playground with live property controls for this component and generated code.

Examples

Between sections

Column(Modifier.fillMaxWidth()) {
    Text("Inbox", style = MaterialTheme.typography.titleMedium)
    HorizontalDivider(Modifier.padding(vertical = 12.dp))
    Text("Starred", style = MaterialTheme.typography.titleMedium)
}

Parameters

NameTypeDefaultDescription
thicknessDpDividerDefaults.ThicknessLine thickness.
colorColorDividerDefaults.colorDefaults to outlineVariant.

Guidelines

Do:

Don't:

Accessibility

Related components