WARNING! You are browsing the docs for an old version of TallStackUI. See the v4 docs.

Powerful suite of Blade components for TALL Stack apps.

Dropdown

Dropdown component.

WARNING!

You are browsing the docs for an old version of TallStackUI. Consider upgrade your project to TallStackUI v4.

Menu
<x-dropdown text="Menu" position="bottom-end">
<x-dropdown.items text="Settings" />
<x-dropdown.items text="Logout" separator />
</x-dropdown>

All available positions based on the AlpineJS anchor plugin.

Menu
<!-- Available Positions:
bottom,
bottom-start,
bottom-end,
top,
top-start,
top-end,
left,
left-start,
left-end,
right,
right-start,
right-end
-->
 
<x-dropdown text="Menu" position="bottom-start">
<x-dropdown.items text="Settings" />
<x-dropdown.items text="Logout" separator />
</x-dropdown>
<x-dropdown icon="chevron-down">
<x-dropdown.items text="Settings" />
<x-dropdown.items text="Logout" separator />
</x-dropdown>

An option to use icons without rotate animation

<x-dropdown icon="ellipsis-vertical" static>
<x-dropdown.items text="Settings" />
<x-dropdown.items text="Logout" separator />
</x-dropdown>
XS
SM
MD
LG
<!-- Boolean size flags: xs, sm, md (default), lg -->
 
<x-dropdown text="Account" xs>
<x-dropdown.items text="Profile" icon="user" />
</x-dropdown>
 
<x-dropdown text="Account" sm>
<x-dropdown.items text="Profile" icon="user" />
</x-dropdown>
 
<x-dropdown text="Account">
<x-dropdown.items text="Profile" icon="user" />
</x-dropdown>
 
<x-dropdown text="Account" lg>
<x-dropdown.items text="Profile" icon="user" />
</x-dropdown>
xxs
xs
sm
md
lg
xl
2xl
<!-- Available widths: xxs, xs, sm, md, lg, xl, 2xl -->
 
<x-dropdown text="xxs" width="xxs">
<x-dropdown.items text="xxs" icon="user" />
</x-dropdown>
<x-dropdown text="xs" width="xs">
<x-dropdown.items text="xs" icon="user" />
</x-dropdown>
<x-dropdown text="sm" width="sm">
<x-dropdown.items text="sm" icon="user" />
</x-dropdown>
<x-dropdown text="md" width="md">
<x-dropdown.items text="md" icon="user" />
</x-dropdown>
<x-dropdown text="lg" width="lg">
<x-dropdown.items text="lg" icon="user" />
</x-dropdown>
<x-dropdown text="xl" width="xl">
<x-dropdown.items text="xl" icon="user" />
</x-dropdown>
<x-dropdown text="2xl" width="2xl">
<x-dropdown.items text="2xl" icon="user" />
</x-dropdown>
Menu
<x-dropdown text="Menu">
<x-slot:header>
<p>Welcome!</p>
</x-slot:header>
<x-dropdown.items icon="cog" text="Settings" />
<x-dropdown.items icon="arrow-left-on-rectangle" text="Logout" separator />
</x-dropdown>
<x-dropdown>
<x-slot:action>
<x-button x-on:click="show = !show" sm outline>Open</x-button>
</x-slot:action>
<x-dropdown.items icon="cog" text="Settings" />
<x-dropdown.items icon="arrow-left-on-rectangle" text="Logout" separator />
</x-dropdown>
Menu
<x-dropdown text="Menu"
x-on:open="alert(`Open, 'show' status: ${$event.detail.status}`)"
x-on:select="alert('Selected')">
<x-dropdown.items text="Settings" />
<x-dropdown.items text="Logout" separator />
</x-dropdown>

Code highlighting provided by Torchlight