Guides
Navigation
Feedback
Overlays
Layout
Data Display
Forms
.md

Layout

collapsible

An interactive panel that expands and collapses its content.

@peduarte starred 3 repositories

@radix-ui/primitives

Installation

php artisan ui:add collapsible

Usage

<x-ui.collapsible :open="false">
    <x-ui.collapsible.trigger>Toggle</x-ui.collapsible.trigger>
    <x-ui.collapsible.content>
        Hidden content revealed on toggle.
    </x-ui.collapsible.content>
</x-ui.collapsible>

Ships its own inline <script>; no JS dependencies. Compose <x-ui.collapsible>, <x-ui.collapsible.trigger>, <x-ui.collapsible.content>; pass :open to start expanded.

Props

Every prop with its default. Pass any of them as attributes, using : to bind a PHP value.

@props([
    'open' => false,
])