Skip to content

Accordion

A vertically stacked set of interactive headings that each reveal a section of content.

Basic Usage

The basic accordion mode only allows one panel to be expanded at a time. Use type="single" and collapsible to allow closing the currently open panel.

Example

Multiple Panels

Set type="multiple" to allow multiple panels to be expanded at the same time.

Example

Theming

Global Customization (BrConfigProvider) & Local Customization

You can override default CSS variables via the theme prop of BrConfigProvider, or directly override styles using TailwindCSS utility classes.

Example

API

BrAccordion Props

NameTypeDefaultDescription
type'single' | 'multiple''single'Determines whether one or multiple items can be opened at the same time.
modelValue / v-modelstring | string[]-The value of the item(s) to expand.
defaultValuestring | string[]-The value of the item(s) to expand by default.
collapsiblebooleanfalseWhen type is "single", allows closing content when clicking trigger for an open item.
disabledbooleanfalseWhether the entire accordion is disabled.

BrAccordionItem Props

NameTypeDefaultDescription
valuestring-(Required) A unique value for the item.
disabledbooleanfalseWhether the item is disabled.

BrAccordionTrigger Props

NameTypeDefaultDescription
iconstring | Component-Custom icon component to replace the default ChevronDown.
hideIconbooleanfalseWhether to hide the right icon.

Slots

  • BrAccordionTrigger supports #icon slot to customize the toggle icon.
  • BrAccordionContent has a default slot for the content.