Collapsible¶
A container that can be expanded or collapsed by clicking its header.
The header displays title with an animated arrow indicator that rotates 90° when the section is open. A vertical separator bar is shown to the left of the expanded content.
Example¶
Collapsible(title = Component.literal("Advanced Settings")) {
// content shown when expanded
Text(Component.literal("Option A"))
}
Parameters¶
-
title: The text displayed in the collapsible header.
-
modifier: Modifiers applied to the outer
Columncontainer. -
initiallyExpanded: Whether the section starts in the expanded state.
-
onToggled: Called when the expanded state changes; receives the new state.
-
content: The composable content shown when expanded.