accordion

Accordion

Stacked sections the shopper opens and closes, one or several at a time, such as shipping and returns on a product page.

Parts

PartFileDoes
AccordionAccordion.vueGroups all parts of the accordion.
AccordionContentAccordionContent.vueHolds what its item shows while open.
AccordionItemAccordionItem.vueGroups a trigger with the content it opens and closes.
AccordionTriggerAccordionTrigger.vueOpens and closes the content of its item.

Anatomy

<Accordion>
  <AccordionItem>
    <AccordionTrigger />
    <AccordionContent />
  </AccordionItem>
</Accordion>

Styling

All of Accordion’s styles live in accordion.json. New to styling in Frontic UI? How styling works →

Install

npm packages
@lucide/vue
@vueuse/core
reka-ui

API reference

Accordion.vue

Groups all parts of the accordion.

Props 11

PropTypeDefault
collapsiblebooleanfalse
disabledbooleanfalse
dirDirection'ltr'
orientationDataOrientation'vertical'
unmountOnHidebooleantrue
asChildbooleanfalse
asAsTag | Component—
typeSingleOrMultipleType—
modelValuestring | string[]—
defaultValuestring | string[]—
classClassValue—

Events 1

EventPayload
update:modelValuevalue: string | string[] | undefined

Slots 1

SlotSlot props
default{ modelValue: AcceptableValue | AcceptableValue[] | undefined; }

Recipe accordion 1 group

AccordionContent.vue

AccordionItem.vue

AccordionTrigger.vue
Accordion
State