Accordion

fun Accordion(sections: List<AccordionSection>, size: AccordionSize, modifier: Modifier = Modifier, flushAlignment: Boolean = false)

Accordion

The accordion component delivers large amounts of content in a small space through progressive disclosure. The header title gives the user a high level overview of the content allowing the user to decide which sections to read.

Accordions can make information processing and discovering more effective. However, it does hide content from users and it’s important to account for a user not noticing or reading all of the included content.

(From Accordion documentation)

Parameters

sections

A list of AccordionSection objects, each representing a section in the accordion.

size

The size of the accordion, determining the overall visual density and padding. Use AccordionSize.

modifier

Modifier for styling and layout of the accordion.

flushAlignment

Whether to use flush alignment. When true, the section title and chevron icon will have no padding, aligning them with the divider lines. Defaults to false.