View laravel-hotwire on GitHub
1M
v0.91.0
Search 71 components and 72 controllers by name, category or description.
Tabs
ARIA tab set with horizontal or vertical keyboard navigation and server-selected state
Basic
Server-rendered active tab, keyboard navigation via the tabs controller.
Profile settings — display name, avatar and public bio.
Billing settings — payment method, invoices and tax info.
Notification preferences — email, in-app and mobile push.
<hw:tabs id="account" active="profile">
<hw:tabs.list aria-label="Account">
<hw:tabs.trigger value="profile">Profile</hw:tabs.trigger>
<hw:tabs.trigger value="billing">Billing</hw:tabs.trigger>
<hw:tabs.trigger value="notifications">Notifications</hw:tabs.trigger>
</hw:tabs.list>
<hw:tabs.panel value="profile">
<p>Profile settings — display name, avatar and public bio.</p>
</hw:tabs.panel>
<hw:tabs.panel value="billing">
<p>Billing settings — payment method, invoices and tax info.</p>
</hw:tabs.panel>
<hw:tabs.panel value="notifications">
<p>Notification preferences — email, in-app and mobile push.</p>
</hw:tabs.panel>
</hw:tabs>
Line variant
Underline-style list with icons.
Preview content…
Code content…
Project settings…
<hw:tabs id="project" active="preview">
<hw:tabs.list variant="line" aria-label="Project">
<hw:tabs.trigger value="preview">
<hw:icon name="app-window" />
Preview
</hw:tabs.trigger>
<hw:tabs.trigger value="code">
<hw:icon name="code" />
Code
</hw:tabs.trigger>
<hw:tabs.trigger value="settings">
<x-lucide-settings class="size-4" />
Settings
</hw:tabs.trigger>
</hw:tabs.list>
<hw:tabs.panel value="preview">Preview content…</hw:tabs.panel>
<hw:tabs.panel value="code">Code content…</hw:tabs.panel>
<hw:tabs.panel value="settings">Project settings…</hw:tabs.panel>
</hw:tabs>
Disabled tab
Skipped by keyboard navigation.
Profile settings…
Billing settings…
Team settings…
<hw:tabs id="account-disabled" active="profile">
<hw:tabs.list aria-label="Account">
<hw:tabs.trigger value="profile">Profile</hw:tabs.trigger>
<hw:tabs.trigger value="billing" disabled>Billing (locked)</hw:tabs.trigger>
<hw:tabs.trigger value="team">Team</hw:tabs.trigger>
</hw:tabs.list>
<hw:tabs.panel value="profile">Profile settings…</hw:tabs.panel>
<hw:tabs.panel value="billing">Billing settings…</hw:tabs.panel>
<hw:tabs.panel value="team">Team settings…</hw:tabs.panel>
</hw:tabs>
Vertical orientation
Arrow Up/Down navigation.
General settings…
Security settings…
Integrations…
Danger zone…
<hw:tabs id="settings-vertical" active="general" orientation="vertical">
<div class="flex gap-4">
<hw:tabs.list aria-label="Settings" class="min-w-40">
<hw:tabs.trigger value="general">General</hw:tabs.trigger>
<hw:tabs.trigger value="security">Security</hw:tabs.trigger>
<hw:tabs.trigger value="integrations">Integrations</hw:tabs.trigger>
<hw:tabs.trigger value="danger">Danger zone</hw:tabs.trigger>
</hw:tabs.list>
<div class="flex-1">
<hw:tabs.panel value="general">General settings…</hw:tabs.panel>
<hw:tabs.panel value="security">Security settings…</hw:tabs.panel>
<hw:tabs.panel value="integrations">Integrations…</hw:tabs.panel>
<hw:tabs.panel value="danger">Danger zone…</hw:tabs.panel>
</div>
</div>
</hw:tabs>
URL syncing
Active tab reads from ?tab= and the tab-url controller pushes it back on change.
Try switching tabs — the URL updates with ?tab=….
Reload with ?tab=billing and this panel starts active.
Great for deep-linking into a specific tab.
<hw:tabs
id="url-sync"
:active="request()->query('tab', 'profile')"
:stimulus="stimulus()->controller('tab-url')->action('tab-url', 'update', 'tabs:change')"
>
<hw:tabs.list variant="line" aria-label="Settings">
<hw:tabs.trigger value="profile" data-tab-name="profile">Profile</hw:tabs.trigger>
<hw:tabs.trigger value="billing" data-tab-name="billing">Billing</hw:tabs.trigger>
<hw:tabs.trigger value="team" data-tab-name="team">Team</hw:tabs.trigger>
</hw:tabs.list>
<hw:tabs.panel value="profile">
<p>Try switching tabs — the URL updates with <code>?tab=…</code>.</p>
</hw:tabs.panel>
<hw:tabs.panel value="billing">
<p>Reload with <code>?tab=billing</code> and this panel starts active.</p>
</hw:tabs.panel>
<hw:tabs.panel value="team">
<p>Great for deep-linking into a specific tab.</p>
</hw:tabs.panel>
</hw:tabs>