Divider

Divider is a thin grey keyline that help create subsections of content.

Wraps a androidx.compose.material3.HorizontalDivider and androidx.compose.material3.VerticalDivider with the Skapa recommended colour.

Dividers should be used when the interface and information presented would benefit from visual grouping, and never as a decorative element. Only use dividers in contexts where whitespace is not enough to create separation.

See also

Samples

SkapaTheme2 {
    Column {
        SquareBox {
            Divider(
                modifier = Modifier
                    .padding(all = SkapaSpacing.space100)
                    .align(Alignment.Center),
                orientation = Orientation.Horizontal
            )
        }
        SquareBox {
            Divider(
                modifier = Modifier
                    .padding(all = SkapaSpacing.space100)
                    .align(Alignment.Center),
                orientation = Orientation.Vertical
            )
        }
    }
}

fun Divider(modifier: Modifier = Modifier, orientation: Orientation = Orientation.Horizontal)(source)

Divider is a thin grey keyline that help create subsections of content.

Wraps a androidx.compose.material3.HorizontalDivider and androidx.compose.material3.VerticalDivider with the Skapa recommended colour.

Dividers should be used when the interface and information presented would benefit from visual grouping, and never as a decorative element. Only use dividers in contexts where whitespace is not enough to create separation.

Parameters

modifier

Modifier to be applied to the Divider

orientation

Orientation of the Divider

See also

Samples

SkapaTheme2 {
    Column {
        SquareBox {
            Divider(
                modifier = Modifier
                    .padding(all = SkapaSpacing.space100)
                    .align(Alignment.Center),
                orientation = Orientation.Horizontal
            )
        }
        SquareBox {
            Divider(
                modifier = Modifier
                    .padding(all = SkapaSpacing.space100)
                    .align(Alignment.Center),
                orientation = Orientation.Vertical
            )
        }
    }
}