Separator

fun ColumnScope.Separator(modifier: Modifier = Modifier, color: Color = LocalContentColor.current, thickness: Dp = Dp.Hairline)

Creates a horizontal separator line within a ColumnScope.

For interactive preview & code examples, visit Separators Documentation.

Basic Example

Column {
Text("Item 1")
Separator() // Horizontal separator in Column
Text("Item 2")
}

Row {
Text("Item 1")
Separator() // Vertical separator in Row
Text("Item 2")
}

Parameters

modifier

Modifier to be applied to the separator.

color

The color of the separator line. Defaults to the current content color.

thickness

The thickness of the separator line.


fun RowScope.Separator(modifier: Modifier = Modifier, color: Color = LocalContentColor.current, thickness: Dp = Dp.Hairline)

Creates a vertical separator line within a RowScope.

For interactive preview & code examples, visit Separators Documentation.

Basic Example

Column {
Text("Item 1")
Separator() // Horizontal separator in Column
Text("Item 2")
}

Row {
Text("Item 1")
Separator() // Vertical separator in Row
Text("Item 2")
}

Parameters

modifier

Modifier to be applied to the separator.

color

The color of the separator line. Defaults to the current content color.

thickness

The thickness of the separator line.