OudsHorizontalDivider
fun OudsHorizontalDivider(modifier: Modifier = Modifier, color: OudsDivider.Color = OudsDivider.Color.Default)
An OUDS horizontal divider.
This composable renders a horizontal line that can be used to visually separate content. The color of the divider can be specified using the OudsDivider.Color enum, and the thickness is defined by the current theme's divider border width. Note that a divider border width token set to 0 dp will produce a single pixel divider regardless of screen density.
Parameters
modifier
Modifier applied to the divider.
color
The color of the divider, chosen from the OudsDivider.Color enum. Default value set to OudsDivider.Color.Default
.
Samples
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import com.orange.ouds.core.component.OudsHorizontalDivider
import com.orange.ouds.core.component.OudsVerticalDivider
import com.orange.ouds.core.theme.OudsTheme
fun main() {
//sampleStart
Column(modifier = Modifier.padding(OudsTheme.spaces.fixed.short)) {
Text(text = "Up")
OudsHorizontalDivider(modifier = Modifier.fillMaxWidth())
Text(text = "Down")
}
//sampleEnd
}