-
-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
Describe your issue
The content lambda for ModalBottomSheet and Dialog do not follow the layout direction provided by LocalLayoutDirection. For now there is a work around by using:
CompositionLocalProvider(LocalLayoutDirection provides LocalLayoutDirection.current) {
// content
}
What version of Compose Unstyled are you using?
1.49.6
What version of Compose are you using?
Compose Bom 2026.01.00
Which platforms can you reproduce the bug on?
Select one or multiple:
- Android
- iOS
- Desktop (Windows, Linux, MacOS)
- Web WASM
- Web JS
Minimum reproducible code
val sheetState = rememberModalBottomSheetState(SheetDetent.FullyExpanded)
CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Rtl) {
ModalBottomSheet(
state = sheetState,
onDismiss = { sheetState.targetDetent = SheetDetent.Hidden }
) {
Sheet {
// Row won't follow RTL in this case
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween
) {
Text(text = "Left", color = Color.Black)
Text(text = "Right", color = Color.Black)
}
}
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels