Composables
Docs Login
Pairel

Separator

Jetpack Compose Component

Download
package com.composables.pairel.components

import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.composables.pairel.theme.Theme
import com.composeunstyled.UnstyledHorizontalSeparator
import com.composeunstyled.UnstyledVerticalSeparator

enum class SeparatorOrientation {
    Horizontal,
    Vertical,
}

@Composable
fun Separator(orientation: SeparatorOrientation, modifier: Modifier = Modifier) {
    when (orientation) {
        SeparatorOrientation.Horizontal ->
            UnstyledHorizontalSeparator(Theme.colors.border, modifier, 1.dp)
        SeparatorOrientation.Vertical ->
            UnstyledVerticalSeparator(Theme.colors.border, modifier, 1.dp)
    }
}

More components from Pairel

by Alex Styl

Search screens and components

Screen flows

Screens

UI Elements

One Android lesson, every Wednesday

Building Android apps?

What Alex learned building Android apps for 14 years, so you don't have to. Reads in under a minute.

Join 3,500+ Android developers. Unsubscribe any time.

You're subscribed

The next lesson lands in on Wednesday.