shadcn.io is an independent project built on shadcn/ui
An X icon sits beside the title and again before Remove Member. Keep Member is the cancel label. The description says the person would lose project access. Nobody is removed.
Name both outcomes when Cancel is vague. Put the icon on the destructive action only. A plain delete can be a destructive Button without a custom cancel. In React, Ark UI does not remove the member.
Installation
Anatomy

Usage
<AlertDialog>
<AlertDialogTrigger asChild>
<Button variant="destructive">Remove Member</Button>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<div className="flex items-center gap-2">
<XIcon aria-hidden="true" className="size-5 text-destructive" />
<AlertDialogTitle>Remove Team Member</AlertDialogTitle>
</div>
<AlertDialogDescription>
Are you sure you want to remove this member from the team? They will
lose access to all projects and data.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Keep Member</AlertDialogCancel>
<AlertDialogClose asChild>
<AlertDialogAction variant="destructive">
<XIcon aria-hidden="true" data-icon="inline-start" />
Remove Member
</AlertDialogAction>
</AlertDialogClose>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>FAQ
Why an X icon instead of a trash can?
X means remove or exclude, which fits people and access. A trash can means destroying data. A user-minus icon works for members too.
Is an icon in both the title and the button too much?
For removing people, the repetition is a safeguard: removing the wrong person is costly. For routine deletions one icon is enough.
Why Keep Member instead of Cancel?
It states the safe outcome: the member stays. Cancel only says the dialog closes.
How is the destructive button styled?
With variant="destructive" on AlertDialogAction and the icon marked data-icon="inline-start". The variant follows the theme, so there's no need for raw color classes.
API Reference
Alert Dialog
Sets asChild and variant="destructive". The rest is on the Alert Dialog page.
Button
Sets variant="destructive". The rest is on the Button page.



