Divider

Display a seperator to divide content

View in Playground

Constructors

@Composable
fun Divider(
    modifier: Modifier = Modifier,
    color: Color = MaterialTheme.colors.onSurface.copy(alpha = DividerAlpha),
    thickness: Dp = 1.dp,
    startIndent: Dp = 0.dp
)
  • modifier – modifier to be applied to the composable

  • color – color to be used for the divider

  • thickness – thickness to be used for the divider

  • startIndent – indentation to be applied to the start of the divider

Examples

Divider

Divider()

Alert dialog

Colored Divider

Divider(color = Color.Red)

Alert dialog

Divider with thickness

Divider(thickness = 12.dp)

Alert dialog

Divider with Indent

Divider(startIndent = 12.dp)

Alert dialog