UI components

Collapse

Basics

The moonshine::collapse component allows you to collapse content.

<x-moonshine::collapse title="Hide / Show">
{{ fake()->text() }}
</x-moonshine::collapse>

Show expanded

If the show parameter is TRUE, then by default the block will be displayed expanded.

<x-moonshine::collapse title="Hide / Show" :open="true">
{{ fake()->text() }}
</x-moonshine::collapse>

Saving state

If the persist parameter is set to TRUE, then the state of the block will be preserved.

<x-moonshine::collapse title="Hide / Show" :persist="true">
{{ fake()->text() }}
</x-moonshine::collapse>