Collapse

You're browsing the documentation for an old version of MoonShine. Consider upgrading your project to MoonShine 2.x.

# Basics

The moonshine::collapse component allows you to collapse content

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

Qui quia nemo delectus in. Porro nulla eveniet sed exercitationem. Nam consequatur ut officia illo.

# Show expanded

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

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

Et id vitae rem illum id vel consequuntur. Natus id suscipit qui cum accusamus quis. Blanditiis rerum vero facere omnis numquam.

# Save state

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

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

Eos incidunt repellendus eius et soluta aut quos. Hic error omnis rerum eos rerum perspiciatis dolorem. Facilis dolorum aliquid quas qui magni quos.