Docs
RTL
Right-to-left layout support in Jetpack Compose.
Compose mirrors layouts automatically based on the ambient layout direction. caveui components use start/end (not left/right) padding and alignment, so they flip correctly in RTL locales with no extra work.
Preview a component in RTL
kotlin
import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.platform.LocalLayoutDirection
CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Rtl) {
CaveTheme {
CaveButton(text = "ابدأ", onClick = {})
}
}When you build a new component, always forward the modifier and use start/end padding so RTL keeps working for everyone.