State of Compose 2023 results are in! Click here to learn more

← Back to Material 3 Compose

Divider

Component
in
Material 3
. Since 1.0.0

Overview

Code Examples

<a href="https://m3.material.io/components/divider/overview" class="external" target="_blank">Material Design divider</a>.

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

!Divider image(https://developer.android.com/images/reference/androidx/compose/material3/divider.png)

@param modifier the Modifier to be applied to this divider line. @param thickness thickness of this divider line. Using Dp.Hairline will produce a single pixel divider regardless of screen density. @param color color of this divider line.

Overloads

Divider

@Composable
fun Divider(
    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