{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "alert",
  "title": "Alert",
  "author": "Ballmac <https://ui.ballmac.com>",
  "description": "A semantic callout with five theme-aware tones, clear icon placement, an action row, and opt-in urgent announcements.",
  "dependencies": [
    "class-variance-authority"
  ],
  "registryDependencies": [
    "utils"
  ],
  "files": [
    {
      "path": "registry/ballmac/components/alert.tsx",
      "content": "// Ballmac UI: Alert. https://ui.ballmac.com/components/alert\n// Based on shadcn/ui Alert (MIT, Copyright (c) 2023 shadcn), adding semantic tones and an action slot.\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@/lib/utils\"\n\nconst alertVariants = cva(\n  \"grid w-full grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3 gap-y-1 rounded-xl border p-4 text-sm [&>svg]:mt-0.5 [&>svg]:size-4\",\n  {\n    variants: {\n      variant: {\n        default: \"border-border bg-card text-card-foreground\",\n        info: \"border-primary/25 bg-primary/5 text-foreground\",\n        success: \"border-chart-2/30 bg-chart-2/10 text-foreground\",\n        warning: \"border-chart-3/30 bg-chart-3/10 text-foreground\",\n        destructive: \"border-destructive/30 bg-destructive/10 text-foreground\",\n      },\n    },\n    defaultVariants: { variant: \"default\" },\n  },\n)\n\ntype AlertProps = React.ComponentProps<\"div\"> &\n  VariantProps<typeof alertVariants> & {\n    /** Announce urgent messages; ordinary alerts remain in the reading order. */\n    urgent?: boolean\n  }\nfunction Alert({\n  className,\n  variant = \"default\",\n  urgent = false,\n  ...props\n}: AlertProps) {\n  return (\n    <div\n      data-slot=\"alert\"\n      role={urgent ? \"alert\" : undefined}\n      className={cn(alertVariants({ variant }), className)}\n      {...props}\n    />\n  )\n}\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"alert-title\"\n      className={cn(\"col-start-2 font-semibold leading-5\", className)}\n      {...props}\n    />\n  )\n}\nfunction AlertDescription({\n  className,\n  ...props\n}: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"alert-description\"\n      className={cn(\n        \"col-start-2 text-muted-foreground leading-relaxed [&_p]:leading-relaxed\",\n        className,\n      )}\n      {...props}\n    />\n  )\n}\nfunction AlertAction({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"alert-action\"\n      className={cn(\n        \"col-start-2 mt-2 flex flex-wrap items-center gap-2\",\n        className,\n      )}\n      {...props}\n    />\n  )\n}\nexport {\n  Alert,\n  AlertTitle,\n  AlertDescription,\n  AlertAction,\n  alertVariants,\n  type AlertProps,\n}\n",
      "type": "registry:ui",
      "target": "@components/ballmac/alert.tsx"
    }
  ],
  "meta": {
    "schema": 1,
    "tier": "free",
    "tags": [
      "alert",
      "callout",
      "status"
    ],
    "version": "1.0.0",
    "updated": "2026-09-29",
    "ai": {
      "summary": "A semantic callout with five theme-aware tones, clear icon placement, an action row, and opt-in urgent announcements.",
      "whenToUse": [
        "Display a status or important message",
        "Pair a warning with a clear next action"
      ],
      "whenNotToUse": [
        "Use a toast for transient confirmation"
      ],
      "composesWith": [
        "badge",
        "button"
      ],
      "a11y": [
        {
          "keys": "Tab",
          "action": "moves to links and actions"
        }
      ],
      "customization": [
        "variant: default | info | success | warning | destructive",
        "urgent: announce new urgent content"
      ]
    },
    "source": {
      "name": "shadcn/ui Alert",
      "url": "https://github.com/shadcn-ui/ui",
      "license": "MIT",
      "copyright": "Copyright (c) 2023 shadcn",
      "modified": true
    },
    "examples": [
      "alert-demo",
      "alert-states"
    ],
    "url": "https://ui.ballmac.com/components/alert"
  },
  "categories": [
    "feedback"
  ],
  "type": "registry:ui"
}