Components
Divider
Visual separator lines supporting Horizontal & Vertical orientations, Solid/Dashed/Dotted stroke styles, indents, and center label partitions
The UX4G Divider suite provides clean visual separation between layout sections, lists, form groups, and alternative authentication options:
- Horizontal Divider: Standard full-width or indented horizontal separator supporting
Solid,Dashed, andDottedstroke styles. - Vertical Divider: Vertical partition bar for separating items inside row containers and action toolbars.
- Label Divider: Centered text or badge separator (e.g.
"OR"/"SECTION") with symmetric splitting lines and configurable spacing.
Import from com.ux4g.designsystemv1.components.Ux4gDivider.
Interactive Previews
1. Horizontal Divider (Ux4gDividerOrientation.Horizontal)
Ux4gDivider - Horizontal Styles & IndentsJetpack Compose

2. Vertical Divider (Ux4gDividerOrientation.Vertical)
Ux4gDivider - Vertical OrientationJetpack Compose

3. Label Divider (Partition with Center Text)
Ux4gDivider - Labeled PartitionJetpack Compose

Kotlin Usage
import androidx.compose.foundation.layout.*
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.ux4g.designsystemv1.components.Ux4gDivider
import com.ux4g.designsystemv1.components.Ux4gDividerOrientation
import com.ux4g.designsystemv1.components.Ux4gDividerStyle
import com.ux4g.designsystemv1.foundation.Ux4gColors
import com.ux4g.designsystemv1.foundation.defaultTypography
@Composable
fun DividerShowcaseScreen() {
Column(
modifier = Modifier
.fillMaxWidth()
.padding(16.dp),
verticalArrangement = Arrangement.spacedBy(20.dp)
) {
// 1. Standard Solid Divider
Text("Standard Divider", style = defaultTypography.hS_strong)
Ux4gDivider()
// 2. Labeled "OR" Separator
Ux4gDivider(
label = {
Text("OR CONTINUE WITH", style = defaultTypography.lS_strong, color = Ux4gColors.neutral600)
}
)
// 3. Vertical Separator Row
Text("Vertical Partition", style = defaultTypography.hS_strong)
Row(
modifier = Modifier
.fillMaxWidth()
.height(40.dp),
horizontalArrangement = Arrangement.spacedBy(16.dp),
verticalAlignment = Alignment.CenterVertically
) {
Text("Citizen Login", style = defaultTypography.bM_default)
Ux4gDivider(orientation = Ux4gDividerOrientation.Vertical)
Text("Officer Portal", style = defaultTypography.bM_default)
Ux4gDivider(orientation = Ux4gDividerOrientation.Vertical)
Text("Admin Console", style = defaultTypography.bM_default)
}
}
}Parameters
Ux4gDivider Props
| Prop | Type | Description | Default |
|---|---|---|---|
modifier | Modifier | Compose layout modifier. | Modifier |
orientation | Ux4gDividerOrientation | Line orientation: Horizontal or Vertical. | Ux4gDividerOrientation.Horizontal |
color | Color | Stroke color of the divider line. | Ux4gColors.neutral900.copy(alpha = 0.2f) |
thickness | Dp | Thickness height (horizontal) or width (vertical) of the stroke. | 1.dp |
style | Ux4gDividerStyle | Visual stroke style: Solid, Dashed, Dotted. | Ux4gDividerStyle.Solid |
startIndent | Dp | Inset padding before the start of the divider line. | 0.dp |
endIndent | Dp | Inset padding after the end of the divider line. | 0.dp |
label | (@Composable () -> Unit)? | Optional composable centered between symmetric partition lines. | null |
labelSpacing | Dp | Spacing gap between the partition lines and the centered label. | 8.dp |
width | Dp? | Optional fixed width constraint override. | null |
height | Dp? | Optional fixed height constraint override. | null |
Ux4gDividerOrientation Enum
| Value | Description |
|---|---|
Horizontal | Full-width horizontal divider dividing vertical content blocks. |
Vertical | Vertical partition dividing horizontally aligned elements in a Row. |
Ux4gDividerStyle Enum
| Value | Dash Pattern | Description |
|---|---|---|
Solid | Continuous | Standard solid straight separator line. |
Dashed | 12.dp line, 8.dp gap | Elongated dashed boundary line. |
Dotted | 4.dp dot, 4.dp gap | Compact dotted boundary line. |
Date Picker
Date selection input and calendar dialog supporting Single date mode, Range selection, month/year grid switchers, status validations, and date constraints
Dropdown
Interactive Action Dropdown menus and Selection Dropdown fields supporting Single select, Multi-select with chips, and search filtering