# Alert dialog: Media

> `<AlertDialogMedia />` places an icon beside the title on desktop and above it on phones. Use `variant="destructive"` for destructive actions.

Example: https://hextaui.com/docs/alert-dialog/examples/media
Component docs: https://hextaui.com/docs/alert-dialog.md

## Add this example

```bash
npx shadcn@latest add https://hextaui.com/r/alert-dialog-media.json
```

This adds `components/examples/alert-dialog/media.tsx` with the Alert dialog component and the HextaUI theme tokens.

## Source

```tsx title="components/examples/alert-dialog/media.tsx"
import { IconTrash } from "@tabler/icons-react"

import {
  AlertDialog,
  AlertDialogAction,
  AlertDialogCancel,
  AlertDialogContent,
  AlertDialogDescription,
  AlertDialogFooter,
  AlertDialogHeader,
  AlertDialogMedia,
  AlertDialogTitle,
  AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"

export function AlertDialogWithMedia() {
  return (
    <AlertDialog>
      <AlertDialogTrigger render={<Button variant="outline" />}>
        Delete file
      </AlertDialogTrigger>
      <AlertDialogContent>
        <AlertDialogHeader>
          <AlertDialogMedia variant="destructive">
            <IconTrash />
          </AlertDialogMedia>
          <AlertDialogTitle>Delete “invoice-2026.pdf”?</AlertDialogTitle>
          <AlertDialogDescription>
            The file moves to the trash and is removed after 30 days.
          </AlertDialogDescription>
        </AlertDialogHeader>
        <AlertDialogFooter>
          <AlertDialogCancel>Cancel</AlertDialogCancel>
          <AlertDialogAction variant="destructive">Delete</AlertDialogAction>
        </AlertDialogFooter>
      </AlertDialogContent>
    </AlertDialog>
  )
}
```

## Props in this example

### AlertDialogTrigger

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `render` | `ReactElement \| (props, state) => ReactElement` | `<button>` |  |

### AlertDialogMedia

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `"default" \| "destructive"` | `"default"` |  |

### AlertDialogAction

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `ButtonVariant` | `"default"` |  |

## More Alert dialog examples

- [Async action](https://hextaui.com/docs/alert-dialog/examples/async-action.md)
- [Small](https://hextaui.com/docs/alert-dialog/examples/small.md)
- [Detached triggers](https://hextaui.com/docs/alert-dialog/examples/detached-triggers.md)
- [Controlled](https://hextaui.com/docs/alert-dialog/examples/controlled.md)
- [Nested](https://hextaui.com/docs/alert-dialog/examples/nested.md)
- [Long content](https://hextaui.com/docs/alert-dialog/examples/long-content.md)
- [Right to left](https://hextaui.com/docs/alert-dialog/examples/rtl.md)
