If true
, multiple accordion items can be expanded at once.
Accordion
Accordions display a list of high-level options that can expand/collapse to reveal more information.
Props#
Accordion Props#
allowMultiple
allowMultiple
boolean
allowToggle
allowToggle
If true
, any expanded accordion item can be collapsed again.
boolean
colorScheme
colorScheme
Color Schemes for Accordion
are not implemented in the default theme. You can extend the theme to implement them.
string
defaultIndex
defaultIndex
The initial index(es) of the expanded accordion item
ExpandedIndex
index
index
The index(es) of the expanded accordion item
ExpandedIndex
onChange
onChange
The callback invoked when accordion items are expanded or collapsed.
((expandedIndex: ExpandedIndex) => void)
reduceMotion
reduceMotion
If true
, height animation and transitions will be disabled.
boolean
size
size
Sizes for Accordion
are not implemented in the default theme. You can extend the theme to implement them.
string
variant
variant
Variants for Accordion
are not implemented in the default theme. You can extend the theme to implement them.
string
AccordionItem Props#
id
id
A unique id for the accordion item.
string
isDisabled
isDisabled
If true
, the accordion item will be disabled.
boolean
isFocusable
isFocusable
If true
, the accordion item will be focusable.
boolean
AccordionButton Props#
AccordionButton renders a button
and composes Box
, this means you can style
it by passing the pseudo style props _expanded
, _disabled
, _hover
, etc.
AccordionPanel Props#
AccordionPanel renders a div
and composes Collapse
to provide the height
animation.