API reference

ButtonShelf Composable

Displays a compact selectable shelf with an icon above its label.
Use shelves for persistent modes or destinations that benefit from both icon and text.

Signature

@Composable
fun ButtonShelf(
    icon: @Composable () -> Unit,
    label: String,
    onSelectionChange: (Boolean) -> Unit,
    modifier: Modifier = Modifier,
    enabled: Boolean = true,
    selected: Boolean = false,
    colors: SelectableButtonColors = SelectableButtonDefaults.Colors,
    dimensions: ButtonDimensions = UiSetTheme.dimensions.buttons,
    shape: Shape = UiSetTheme.shapes.buttonTile,
    interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
    indication: UiSetIndicationSpec? = UiSetTheme.indications.standard.default,
)

Parameters

icon: @Composable () -> Unit item icon
label: String item label
onSelectionChange: (Boolean) -> Unit callback receiving the requested selection state
modifier: Modifier modifier applied to the shelf
enabled: Boolean whether the shelf accepts input
selected: Boolean whether the shelf is selected
colors: SelectableButtonColors selected, unselected, and disabled colors
dimensions: ButtonDimensions shelf size and icon geometry
shape: Shape shelf background and clipping shape
interactionSource: MutableInteractionSource interaction stream shared with callers observing state
indication: UiSetIndicationSpec? interaction feedback split around the shelf clipping boundary