androidx.compose.material3
HorizontalDivider
Composable function
A divider is a thin line between groups of content, like items in a list.
HorizontalDivider fills the width. VerticalDivider fills the height.

Column(Modifier.width(240.dp)) {
Text("First", Modifier.padding(12.dp))
HorizontalDivider()
Text("Second", Modifier.padding(12.dp))
}
A vertical divider in a Row needs a height. Give the row Modifier.height(IntrinsicSize.Min), so the divider is as tall as the other items.

Row(Modifier.height(IntrinsicSize.Min), verticalAlignment = Alignment.CenterVertically) {
Text("Left", Modifier.padding(12.dp))
VerticalDivider()
Text("Right", Modifier.padding(12.dp))
}
Parameters
@Composable
fun HorizontalDivider(
modifier: Modifier = Modifier,
thickness: Dp = DividerDefaults.Thickness,
color: Color = DividerDefaults.color,
)
modifier: ModifierOptional
modifier: ModifierOptionalDefault: Modifier
Changes size, padding, or position. Use padding to indent the line, for example to line up with text in a list.
thickness: DpOptional
thickness: DpOptionalDefault: DividerDefaults.Thickness
How thick the line is. Default: 1 dp.
color: ColorOptional
color: ColorOptionalDefault: DividerDefaults.color
The line color. Default: the theme's outlineVariant.
Divider types
HorizontalDividerVerticalDivider