Package-level declarations
Types
Functions
Link copied to clipboard
fun Accordion(title: String, modifier: Modifier = Modifier, description: String = "", icon: AccessibilityPainter? = null, onHeaderClick: () -> Unit? = null, state: AccordionState = rememberAccordionState(), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, translations: Accordion.Translations = Accordion.Translations(), headerContentSlot: @Composable () -> Unit? = null, content: @Composable () -> Unit)
It is a space-saving UI element with expandable content that users can open and close by tapping/clicking them. When another item is selected, the previously open content typically collapses, ensuring only one or a few sections are open at a time. It is commonly used for organizing and presenting content in a structured, interactive way, making it ideal for FAQs and other situations where space efficiency is important.