Search 71 components and 72 controllers by name, category or description.
Modal
Accessible modal dialog with focus management and optional reusable Turbo Frame host for stacked instances
Local modal
The trigger and modal content live together on the current page.
Create project
Add a project to the workspace.
<hw:modal>
<hw:modal.trigger>Open modal</hw:modal.trigger>
<hw:modal.content>
<hw:modal.header>
<hw:modal.title>Create project</hw:modal.title>
<hw:modal.description>Add a project to the workspace.</hw:modal.description>
</hw:modal.header>
<div class="grid gap-3 p-4">
<hw:input name="name" placeholder="Project name" />
<hw:button>Create project</hw:button>
</div>
</hw:modal.content>
</hw:modal>
Frame-backed modal
The launcher targets the shared modal frame; the server response supplies its content.
<hw:button as="a" :href="route('edit.modal')" frame="modal">Open frame modal</hw:button>
Stacked overlays
A member editor opens a roles modal, which opens a destructive confirmation — three layers deep. Popovers, dropdowns and the multi-select listbox render in the top layer, so they escape the modal instead of being clipped. Esc closes only the layer on top, and focus returns to the trigger that opened it. Both layers save the same way: a normal form posts, and the server answers with a Turbo Stream that toasts and dismisses that one modal — saving roles leaves the editor underneath open.
Edit member
Sarah Chen joined the Product workspace in March.
Manage roles
Roles decide what Sarah can reach inside the workspace.
<hw:modal id="edit-member" size="lg">
<hw:modal.trigger>
Edit member
</hw:modal.trigger>
<hw:modal.content>
<hw:modal.header>
<hw:modal.title>Edit member</hw:modal.title>
<hw:modal.description>Sarah Chen joined the Product workspace in March.</hw:modal.description>
</hw:modal.header>
<div class="space-y-5">
{{-- The roles modal renders inside this one, so this form stops before it.
The footer button reaches back in with the HTML form attribute. --}}
<hw:form id="edit-member-form" :action="route('components.modal.member')" class="space-y-5">
<hw:field name="display_name" label="Display name">
<hw:input value="Sarah Chen" clearable />
</hw:field>
<div class="grid gap-4 md:grid-cols-2">
<hw:popover>
<hw:popover.trigger>
Who can see this profile?
</hw:popover.trigger>
<hw:popover.content>
<hw:popover.header>
<hw:popover.title>Profile visibility</hw:popover.title>
<hw:popover.description>
Workspace members always see the display name. Everything else follows the member's own
privacy settings.
</hw:popover.description>
</hw:popover.header>
</hw:popover.content>
</hw:popover>
<hw:dropdown>
<hw:dropdown.trigger>
Member actions
</hw:dropdown.trigger>
<hw:dropdown.content>
<hw:dropdown.group>
<hw:dropdown.label>Account</hw:dropdown.label>
<hw:dropdown.item href="#">Resend invitation</hw:dropdown.item>
<hw:dropdown.item href="#">Transfer ownership</hw:dropdown.item>
<hw:dropdown.separator />
<hw:dropdown.item variant="destructive">Remove from workspace</hw:dropdown.item>
</hw:dropdown.group>
</hw:dropdown.content>
</hw:dropdown>
</div>
</hw:form>
<hw:modal id="manage-roles" size="md">
<hw:modal.trigger variant="secondary">
Manage roles
</hw:modal.trigger>
<hw:modal.content>
<hw:modal.header>
<hw:modal.title>Manage roles</hw:modal.title>
<hw:modal.description>Roles decide what Sarah can reach inside the workspace.</hw:modal.description>
</hw:modal.header>
<hw:form :action="route('components.modal.roles')" class="space-y-5">
<hw:field name="roles" label="Assigned roles">
<hw:multi-select
placeholder="Select roles"
:options="[
'admin' => 'Admin',
'editor' => 'Editor',
'billing' => 'Billing manager',
'viewer' => 'Viewer',
]"
:selected="['admin', 'editor']"
search
list-all
/>
</hw:field>
<hw:popover side="left" align="center">
<hw:popover.trigger>
What does Admin grant?
</hw:popover.trigger>
<hw:popover.content>
<p class="text-sm">
Admins manage billing, invite and remove members, and can delete the workspace.
</p>
</hw:popover.content>
</hw:popover>
{{-- Empty target the server replaces when the revoke action fails. --}}
<div id="revoke-error" hidden></div>
<hw:alert-dialog
:close-on-click-outside="false"
title="Revoke admin access?"
description="Sarah keeps her Editor role and stays in the workspace."
confirm-label="Revoke access"
confirm-variant="destructive"
cancel-label="Keep access"
>
<hw:button
variant="destructive"
type="submit"
:formaction="route('components.modal.revoke')"
>
Revoke admin access
</hw:button>
<x-slot:content>
<div class="space-y-2 text-sm text-muted-foreground">
<p>Revoking this role takes effect immediately:</p>
<ul class="list-disc space-y-1 pl-5">
<li>Billing and workspace settings become read-only.</li>
<li>Pending invitations she created are cancelled.</li>
<li>You can grant the role again at any time.</li>
</ul>
</div>
</x-slot:content>
</hw:alert-dialog>
<hw:modal.footer>
<hw:button type="submit">
Save roles
</hw:button>
</hw:modal.footer>
</hw:form>
</hw:modal.content>
</hw:modal>
<hw:modal.footer>
<hw:button type="submit" form="edit-member-form">
Save changes
</hw:button>
</hw:modal.footer>
</div>
</hw:modal.content>
</hw:modal>