Skip to main content
Vuetify0 is now in alpha!
Vuetify0 Logo
Theme
Mode
Palettes
Accessibility
Vuetify One
Sign in to Vuetify One

Access premium tools across the Vuetify ecosystem — Bin, Play, Studio, and more.

Not a subscriber? See what's included

Collapsible

A single-item disclosure toggle for showing and hiding content.

Usage

The Collapsible component provides a simple open/closed toggle for a single content region. It supports v-model for controlled state and exposes data-state attributes for CSS-driven styling.

Anatomy

Anatomy
<script setup lang="ts">
  import { Collapsible } from '@vuetify/v0'
</script>

<template>
  <Collapsible.Root>
    <Collapsible.Activator>
      <Collapsible.Cue />
    </Collapsible.Activator>

    <Collapsible.Content />
  </Collapsible.Root>
</template>

Examples

Controlled

Use v-model to control the open state externally. The disabled prop prevents interaction.

Collapsible vs ExpansionPanel

Both components handle expanding and collapsing content, but they solve different problems:

CollapsibleExpansionPanel
ItemsSingleMultiple
StateBoolean (open / closed)Selection set (IDs)
CoordinationNone — each instance is independentShared — accordion mode, mandatory, enroll
v-modelv-model (boolean)v-model (ID or ID[])
Built oncreateSinglecreateSelection

Use Collapsible when you have a single region to show/hide — a details section, a settings panel, a mobile navigation drawer. Each Collapsible is independent.

Use ExpansionPanel when you have a list of items where expanding one may collapse another — an FAQ, a settings page with sections, an accordion sidebar.

Tip

You can build an FAQ from multiple independent Collapsible instances (see the FAQ example above), but if you need “only one open at a time” behavior, use ExpansionPanel instead — it handles that coordination for you.

Accessibility

Collapsible follows the WAI-ARIA Disclosure pattern↗︎.

Keyboard

KeyAction
EnterToggles the content
SpaceToggles the content

ARIA

AttributeElementValue
aria-expandedActivatortrue when open, false when closed
aria-controlsActivatorPoints to the content element’s id
role="region"ContentLandmarks the content area
aria-labelledbyContentPoints back to the activator’s id

Data attributes

All three sub-components expose data-state="open" or data-state="closed" for CSS-driven styling without JavaScript. The Root and Activator also expose data-disabled when the disabled prop is set.

Was this page helpful?

Ctrl+/