ExpansionPanel
A component for creating accordion-style expansion panels with proper ARIA support.
Usage
The ExpansionPanel component provides a wrapper and item pattern for managing expansion state in accordion-style interfaces. It uses the createSelection composable internally and provides full v-model support with automatic state synchronization.
Accordion Panels
Multiple expandable panels with accordion behavior and a multi-expand mode that allows several panels open at once.
This is the content for panel 1.
This is the content for panel 2.
This is the content for panel 3.
Expanded:
Anatomy
Anatomy
<script setup lang="ts">
import { ExpansionPanel } from '@vuetify/v0'
</script>
<template>
<ExpansionPanel.Group>
<ExpansionPanel.Root>
<ExpansionPanel.Activator>
<ExpansionPanel.Cue />
</ExpansionPanel.Activator>
<ExpansionPanel.Content />
</ExpansionPanel.Root>
</ExpansionPanel.Group>
</template>For instances where you need to wrap the activator in a heading element (h3) for semantic purposes and WAI-ARIA, use the ExpansionPanel.Header component:
AnatomyWithHeader
<script setup lang="ts">
import { ExpansionPanel } from '@vuetify/v0'
</script>
<template>
<ExpansionPanel.Group>
<ExpansionPanel.Root>
<ExpansionPanel.Header>
<ExpansionPanel.Activator>
<ExpansionPanel.Cue />
</ExpansionPanel.Activator>
</ExpansionPanel.Header>
<ExpansionPanel.Content />
</ExpansionPanel.Root>
</ExpansionPanel.Group>
</template> The following API details are for all variations of the ExpansionPanel component.
Was this page helpful?