Search

Search components and blocks

Sign in

Built from the Dialog and Switch components.

Cookie Preference Dialog

Open page

A real-world composition, not a new primitive — the compact Dialog, the Switch, per-category icons, and the ActionSwapButton for the save action, which confirms 'Saved!' before the dialog closes itself.

pnpm dlx shadcn@latest add @ditherui/cookie-preferences-dialog

Install

$ pnpm dlx shadcn@latest add @ditherui/cookie-preferences-dialog

Props

NecessarySwitch checked disabled, ShieldCheckIconalways on
Analytics / Marketing / FunctionalSwitch + onCheckedChange, per-category iconper-category state
Reject allresets every optional category to off, closes immediately—
Save preferencesActionSwapButton — confirms "Saved!", then closes the dialogresetAfter: 1100ms

Agent Tool Approval Dialog

ProOpen page

The pattern every agentic AI app needs before it runs something on the user's behalf — the risk badge, the literal command it's about to execute, an 'always allow' escape hatch for repeat calls, and Deny/Approve actions with the same confirm-then-close ActionSwapButton pattern as the cookie dialog. It opens as a Center Morph Modal: the dialog unfolds from its exact center and folds back the same way.

pnpm dlx shadcn@latest add @ditherui/tool-approval-dialog

Props

Risk badgepulsing dot + label — swap color/copy per risk levelamber ("Caution")
Command<pre><code> — the literal command/args the agent wants to run—
Always allow this commandSwitch — persists a standing approval for this exact calloff
Denycloses without running anything—
ApproveActionSwapButton — confirms "Approved", then closes the dialogresetAfter: 1100ms

Invite Collaborators Dialog

ProOpen page

An email chip input for inviting teammates: type-or-paste-and-Enter to add, a per-row role Select, and a Send button whose label pluralizes with the pending count before confirming and closing — the flow every team workspace or shared AI project needs.

pnpm dlx shadcn@latest add @ditherui/invite-collaborators-dialog

Props

Addvalidates the email, skips duplicates, appends with the default "Can edit" role—
Per-row role SelectViewer / Editor / Admin — reuses the Select component"editor"
Remove (X)drops that invite from the pending list—
Send N invitesActionSwapButton — label pluralizes with the count, confirms "Sent!", then closesdisabled when empty

Profile Settings Dialog

ProOpen page

A settings surface with a tabbed sidebar instead of a form wall — an animated pill tracks the active tab, theme cards share a selection ring, the avatar reveals a change overlay on hover, Billing shows plan usage and invoice history as read-only actions, and an unsaved-changes bar slides in only once the draft actually differs from what's saved, with Discard reverting it exactly.

pnpm dlx shadcn@latest add @ditherui/profile-settings-dialog

Props

Sidebar tabslayoutId pill slides between Profile / Notifications / Appearance / Billing"profile"
Profile photohidden file input — hover reveals a Change overlay, shows the picked filenamenone
Theme cardslayoutId selection ring — Light / Dark / System"system"
Billingplan usage bar, payment method, invoice history — read-only, not part of the dirty diff—
Unsaved changes barheight/opacity spring — appears when the draft differs from the last savehidden
Discard / Save changesDiscard reverts to the last saved snapshot; Save confirms "Saved!" via ActionSwapButton—

Delete Project Confirmation

ProOpen page

A type-to-confirm delete dialog on the Center Morph Modal, for the actions people regret. It unfolds from its center, lists exactly what will be lost, and keeps Delete locked until the project name is typed exactly, with a check appearing in the field when it matches. Delete then runs Deleting, Deleted and closes itself, and the dialog cannot be dismissed mid-delete. Enter submits from the field. Sample project is fictional, swap in your own and wire onDelete to your API.

pnpm dlx shadcn@latest add @ditherui/delete-project-dialog

Props

projectNamestring—
impact{ icon: ReactNode; count: number; label: string }[]files, collaborators, deployments
onDelete() => void—
classNamestring—

Suggested components