Dropdown

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

# Basics

Using the moonshine::dropdown component, you can create dropdown blocks

<x-moonshine::dropdown>
<div class="m-4">
{{ fake()->text() }}
</div>
<x-slot:toggler>Click me</x-slot:toggler>
</x-moonshine::dropdown>

# Title

<x-moonshine::dropdown title="Dropdown title">
<div class="m-4">
{{ fake()->text() }}
</div>
<x-slot:toggler>Click me</x-slot:toggler>
</x-moonshine::dropdown>
<x-moonshine::dropdown>
<div class="m-4">
{{ fake()->text() }}
</div>
<x-slot:toggler>Click me</x-slot:toggler>
<x-slot:footer>Dropdown footer</x-slot:footer>
</x-moonshine::dropdown>

# Placement

Available placement:

bottom top left right

<x-moonshine::dropdown placement="left">
<div class="m-4">
{{ fake()->text() }}
</div>
<x-slot:toggler>Click me</x-slot:toggler>
</x-moonshine::dropdown>

For additional location options, see the official documentation tippy.js