# Alert: Right to left

> The icon, content and close button mirror with the reading direction.

Example: https://hextaui.com/docs/alert/examples/rtl
Component docs: https://hextaui.com/docs/alert.md

## Add this example

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

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

## Source

```tsx title="components/examples/alert/rtl.tsx"
import { IconAlertTriangle } from "@tabler/icons-react"

import {
  Alert,
  AlertClose,
  AlertDescription,
  AlertTitle,
} from "@/components/ui/alert"

export function AlertRtl() {
  return (
    <div dir="rtl" className="w-full max-w-lg">
      <Alert variant="warning">
        <IconAlertTriangle />
        <AlertTitle>تنتهي الفترة التجريبية خلال 3 أيام</AlertTitle>
        <AlertDescription>
          أضف طريقة دفع لإبقاء مساحة العمل نشطة.
        </AlertDescription>
        <AlertClose />
      </Alert>
    </div>
  )
}
```

## Props in this example

### Alert

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `"default" \| "destructive" \| "success" \| "info" \| "warning"` | `"default"` | Colors the icon. destructive and warning are announced assertively. |

## More Alert examples

- [Variants](https://hextaui.com/docs/alert/examples/variants.md)
- [Soft](https://hextaui.com/docs/alert/examples/soft.md)
- [Partial content](https://hextaui.com/docs/alert/examples/partial-content.md)
- [Actions](https://hextaui.com/docs/alert/examples/actions.md)
- [Dismissible](https://hextaui.com/docs/alert/examples/dismissible.md)
- [Controlled](https://hextaui.com/docs/alert/examples/controlled.md)
- [Cancel a dismiss](https://hextaui.com/docs/alert/examples/cancel-dismiss.md)
- [Inserted after load](https://hextaui.com/docs/alert/examples/inserted.md)
- [Rich content](https://hextaui.com/docs/alert/examples/rich-content.md)
