Skip to content

Alert

alert-variants.tsx
import { Stack } from "@/components/ui/stack"
import { Alert, AlertTitle, AlertDescription } from "@/components/ui/alert"

export function AlertVariants() {
  return (
    <Stack direction="col" className="gap-3">
      <Alert>
        <AlertTitle>Heads up</AlertTitle>
        <AlertDescription>You can add components using the CLI.</AlertDescription>
      </Alert>
      <Alert variant="destructive">
        <AlertTitle>Error</AlertTitle>
        <AlertDescription>Your session has expired. Please log in again.</AlertDescription>
      </Alert>
      <Alert variant="warning">
        <AlertTitle>Warning</AlertTitle>
        <AlertDescription>This action cannot be undone once confirmed.</AlertDescription>
      </Alert>
      <Alert variant="success">
        <AlertTitle>Success</AlertTitle>
        <AlertDescription>Your changes have been saved.</AlertDescription>
      </Alert>
    </Stack>
  )
}