Skip to content
Data Display

Accordion

client30.75 kB
@stellaria/nebula-webAccordionProps

Preview

Props

8
PropTypeDefault

chevronPosition

"start" | "end""end"

className

string

—

data

required
readonly AccordionItemData[]

—

defaultValue

AccordionValue<Multiple>

—

disabled

booleanfalse

multiple

Multiple

—

onChange

((value: AccordionValue<Multiple>) => void)

—

value

AccordionValue<Multiple>

—

Slot props

5

Each one spreads over an inner element, so you can restyle a region without forking the component.

PropTypeDefault

iconProps

The item icon, when it has one. The chevron is NOT exposed: motion animates it.

BoxSlotProps

—

itemProps

Every item in the list. It spreads over ALL of them, not over one.

BoxSlotProps

—

labelProps

The item label, inside the button.

TextSlotProps

—

panelProps

The disclosure panel. It lives inside a `Collapse`, so that is what governs its height.

BoxSlotProps

—

triggerProps

The button that opens and closes. It already carries the `aria-expanded` and the `aria-controls`.

Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">

—

Also accepts

On top of its own props, this component forwards these groups.

Style props · 128