View laravel-hotwire on GitHub
1M
v0.91.0
Search 71 components and 72 controllers by name, category or description.
Button
Button or link action with variants, sizes, Turbo Frame targets, hotkeys and tooltips
Variants
Choose a variant according to the action hierarchy and risk.
<hw:button>Default</hw:button>
<hw:button variant="secondary">Secondary</hw:button>
<hw:button variant="outline">Outline</hw:button>
<hw:button variant="ghost">Ghost</hw:button>
<hw:button variant="destructive">Destructive</hw:button>
<hw:button variant="link">Link</hw:button>
Sizes
Text and icon-only sizes cover dense toolbars through prominent calls to action.
<div class="flex flex-wrap items-center gap-2">
<hw:button size="xs">Extra small</hw:button>
<hw:button size="sm">Small</hw:button>
<hw:button>Default</hw:button>
<hw:button size="lg">Large</hw:button>
</div>
<div class="flex flex-wrap items-center gap-2">
<hw:button size="icon-xs" variant="outline" aria-label="Add item">
<x-lucide-plus />
</hw:button>
<hw:button size="icon-sm" variant="outline" aria-label="Add item">
<x-lucide-plus />
</hw:button>
<hw:button size="icon" variant="outline" aria-label="Add item">
<x-lucide-plus />
</hw:button>
<hw:button size="icon-lg" variant="outline" aria-label="Add item">
<x-lucide-plus />
</hw:button>
</div>
Content and states
Compose icons, loading feedback, native disabled state, and an accessible icon-only action.
<hw:button>
<x-lucide-save />
Save changes
</hw:button>
<hw:button variant="outline">
Continue
<x-lucide-arrow-right />
</hw:button>
<hw:button disabled aria-busy="true">
<hw:spinner />
Saving...
</hw:button>
<hw:button
size="icon"
variant="ghost"
tooltip="Edit project"
tooltip-side="top"
aria-label="Edit project"
>
<x-lucide-pencil />
</hw:button>
Links, Turbo Frames, and hotkeys
Render an anchor with as, target a Turbo Frame with frame, or trigger the action globally with hotkey. Try Ctrl K.
<hw:button as="a" :href="route('components.index')" variant="outline">
Browse components
<x-lucide-arrow-up-right />
</hw:button>
<hw:button
as="a"
:href="route('edit.modal')"
frame="modal"
hotkey="ctrl+k"
>
Quick edit
<hw:kbd>Ctrl K</hw:kbd>
</hw:button>
<hw:button as="a" disabled href="/settings">
Unavailable link
</hw:button>