We just launched Compose Examples featuring over 150+ components! Check it out →

HorizontalDivider

Common

Component in Material 3 Compose

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

Divider
image

Last updated:

Installation

dependencies {
   implementation("androidx.compose.material3:material3:1.4.0-alpha02")
}

Overloads

@Composable
fun HorizontalDivider(
    modifier: Modifier = Modifier,
    thickness: Dp = DividerDefaults.Thickness,
    color: Color = DividerDefaults.color,
)

Parameters

namedescription
modifierthe [Modifier] to be applied to this divider line.
thicknessthickness of this divider line. Using [Dp.Hairline] will produce a single pixel divider regardless of screen density.
colorcolor of this divider line.
by @alexstyl