Bottom sheets

In BottomSheets

With vertical actions

val state = rememberModalBottomSheetState(skipPartiallyExpanded = true)
val scope = rememberCoroutineScope()

LaunchedEffect(Unit) {
    state.show()
}

if (state.isVisible) {
    ModalBottomSheet(onDismissRequest = {
        scope.launch {
            state.hide()
            delay(1500)
            state.show()
        }
    }) {
        val items = listOf(
            Icons.Rounded.Share to "Share",
            Icons.Rounded.Link to "Get Link",
            Icons.Rounded.Edit to "Edit name",
            Icons.Rounded.Delete to "Delete items",
        )
        Column(Modifier.navigationBarsPadding()) {
            items.forEach { item ->
                Row(
                    horizontalArrangement = Arrangement.spacedBy(32.dp),
                    modifier = Modifier.clickable { /* TODO */ }.clip(MaterialTheme.shapes.medium).fillMaxWidth()
                        .padding(horizontal = 32.dp, vertical = 18.dp),
                ) {
                    Icon(item.first, null)
                    Text(item.second)
                }
            }
        }
    }
}
In BottomSheets

With checkboxes

Get code →

@Composable
fun NiceTry(){
    Column {
        BasicText("Nice try. Use code COMPOSE10 for a 10% discount on checkout ;)")
    }
}

In BottomSheets

With horizontal actions

Get code →

@Composable
fun NiceTry(){
    Column {
        BasicText("Nice try. Use code COMPOSE10 for a 10% discount on checkout ;)")
    }
}

In BottomSheets

With call to action

Get code →

@Composable
fun NiceTry(){
    Column {
        BasicText("Nice try. Use code COMPOSE10 for a 10% discount on checkout ;)")
    }
}

In BottomSheets

With sticky header

Get code →

@Composable
fun NiceTry(){
    Column {
        BasicText("Nice try. Use code COMPOSE10 for a 10% discount on checkout ;)")
    }
}

Sit tight. We are loading your preview
🐛 Bugs & Suggestions