{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "inline-alert",
  "title": "Inline Alert",
  "author": "Ballmac <https://ui.ballmac.com>",
  "description": "A short in-context message with semantic live priority and an optional corrective action.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "utils"
  ],
  "files": [
    {
      "path": "registry/ballmac/components/inline-alert.tsx",
      "content": "// Ballmac UI: Inline Alert. https://ui.ballmac.com/components/inline-alert\nimport * as React from \"react\"\nimport { CircleAlert, CircleCheck, Info } from \"lucide-react\"\nimport { cn } from \"@/lib/utils\"\n\ntype InlineAlertProps = React.ComponentProps<\"div\"> & {\n  /** Concise status or validation message. */\n  message: string\n  /** Message tone and announcement priority. */\n  tone?: \"info\" | \"success\" | \"error\"\n  /** Optional corrective link or button. */\n  action?: React.ReactNode\n}\n\nfunction InlineAlert({\n  className,\n  message,\n  tone = \"info\",\n  action,\n  ...props\n}: InlineAlertProps) {\n  const Icon =\n    tone === \"error\" ? CircleAlert : tone === \"success\" ? CircleCheck : Info\n  return (\n    <div\n      data-slot=\"inline-alert\"\n      role={tone === \"error\" ? \"alert\" : \"status\"}\n      className={cn(\n        \"flex w-full min-w-0 flex-wrap items-center gap-x-2 gap-y-1 rounded-md border px-3 py-2 text-sm\",\n        tone === \"info\" && \"border-primary/25 bg-primary/5\",\n        tone === \"success\" && \"border-chart-2/30 bg-chart-2/10\",\n        tone === \"error\" && \"border-destructive/30 bg-destructive/10\",\n        className,\n      )}\n      {...props}\n    >\n      <Icon aria-hidden=\"true\" className=\"size-4 shrink-0\" />\n      <span className=\"min-w-0 flex-1\">{message}</span>\n      {action && (\n        <span data-slot=\"inline-alert-action\" className=\"shrink-0\">\n          {action}\n        </span>\n      )}\n    </div>\n  )\n}\n\nexport { InlineAlert, type InlineAlertProps }\n",
      "type": "registry:ui",
      "target": "@components/ballmac/inline-alert.tsx"
    }
  ],
  "meta": {
    "schema": 1,
    "tier": "free",
    "tags": [
      "validation",
      "message",
      "status"
    ],
    "version": "1.0.0",
    "updated": "2026-09-30",
    "ai": {
      "summary": "A short in-context message with semantic live priority and an optional corrective action.",
      "whenToUse": [
        "Explain a field or form outcome",
        "Show a small inline confirmation"
      ],
      "whenNotToUse": [
        "Use alert for a larger callout"
      ],
      "composesWith": [
        "alert",
        "input"
      ],
      "a11y": [
        {
          "keys": "Tab / Enter",
          "action": "Focus and activate an optional action"
        }
      ],
      "customization": [
        "tone: info | success | error",
        "Action slot"
      ]
    },
    "examples": [
      "inline-alert-demo",
      "inline-alert-states"
    ],
    "url": "https://ui.ballmac.com/components/inline-alert"
  },
  "categories": [
    "feedback"
  ],
  "type": "registry:ui"
}