shadcn.io is an independent project built on shadcn/ui
The title is Leave Workspace. The description says a new invite is required to come back. The buttons name both outcomes. Leaving does not happen.
Name the outcome when Cancel could mean the wrong thing. If people may dismiss this without choosing, use a Dialog. In Svelte, Ark UI does not remove anyone from the workspace.
Installation
Anatomy

Usage
<AlertDialog><AlertDialogTrigger>{#snippet asChild(props)}<Button {...props()} variant="outline">Open Dialog</Button>{/snippet}</AlertDialogTrigger><AlertDialogContent><AlertDialogHeader><AlertDialogTitle>Leave Workspace</AlertDialogTitle><AlertDialogDescription>Are you sure you want to leave this workspace? You will need to be re-invited to access it again.</AlertDialogDescription></AlertDialogHeader><AlertDialogFooter><AlertDialogCancel>Stay in Workspace</AlertDialogCancel><AlertDialogClose>{#snippet asChild(props)}<AlertDialogAction {...props()}>Leave Workspace</AlertDialogAction>{/snippet}</AlertDialogClose></AlertDialogFooter></AlertDialogContent></AlertDialog>FAQ
When should I use custom labels instead of Continue and Cancel?
Whenever the action isn't obvious from the title alone. Leave Workspace, Delete Account and Cancel Subscription say what happens; keep Continue and Cancel for generic Are you sure? prompts.
How long can the labels be?
Two to four words, verb first: Leave Workspace, not Please remove me from this workspace. Long labels wrap on narrow screens, where the footer stacks the buttons.
Should the cancel button get a custom label too?
Yes. Stay in Workspace states the safe outcome, so someone who reaches for the first button still knows what it does. Both buttons describing outcomes is what makes this pattern work.
Where does the risky action go?
Last. AlertDialogFooter puts AlertDialogAction after AlertDialogCancel on wide screens and stacks it on top on mobile, the convention people expect for the primary choice.
API Reference
Alert Dialog
Sets props. The rest is on the Alert Dialog page.
Button
Sets props and variant="outline". The rest is on the Button page.




