Accordion

Disclosure & Layout · Guide 1 of 46

Open the live Accordion demo →

Purpose

Organizes content into collapsible sections.

Import

<script lang="ts">
	import { Accordion } from 'bits-ui';
</script>

The registry names Accordion as this guide’s namespace. Copy the exact root and part composition from the live demo rather than guessing part names.

Usage checklist

  • Keep the reading and focus order logical with styles disabled.
  • Preserve keyboard behavior and control-to-content relationships for interactive parts.
  • Check constrained widths, overflow, and reduced-motion behavior.

Secondary reference

After using the local example, consult the upstream Bits UI reference for exhaustive API details.

Continue