--- title: "accordion" description: "Collapsible disclosure list (single or multiple open)." category: "Navigation" --- # accordion Collapsible disclosure list (single or multiple open). ## Installation ```bash php artisan ui:add accordion ``` ## Dependencies - composer: `gehrisandro/tailwind-merge-laravel` ## Usage ```blade Yes. It follows the WAI-ARIA disclosure pattern. {{-- multiple: more than one panel can stay open at a time --}} Same day for orders before 2pm. Thirty days, no questions asked. ``` ## Example The demo rendered on the docs page. ```blade Yes. It follows the WAI-ARIA disclosure pattern. Yes. It uses your theme tokens out of the box. Yes. It slides open with the script the component ships. ``` ## Source Copy this file to the path shown above it. `resources/views/components/ui/accordion.blade.php` ```blade @props([ 'items' => [], 'multiple' => false, ]) @php $rootClasses = \TailwindMerge\Laravel\Facades\TailwindMerge::merge( '', $attributes->get('class'), ); @endphp
except('class') }}> @foreach ($items as $key => $label)

@endforeach
@once @endonce ``` ## Theme tokens `--border`, `--muted-foreground`, `--ring`, `--radius` Ships its own inline