{"name":"alert","title":"Alert","description":"Displays a callout for user attention.","installCommand":"bunx marko-ui add alert -y","usageTags":"<Alert>, <AlertTitle>, <AlertDescription>","importSnippet":"import Alert from \"@/components/ui/alert/alert.marko\";\nimport AlertTitle from \"@/components/ui/alert/title.marko\";\nimport AlertDescription from \"@/components/ui/alert/description.marko\";\nimport AlertAction from \"@/components/ui/alert/action.marko\";","usageSnippet":"<Alert>\n  <Icon name=\"InfoIcon\"/>\n  <AlertTitle>Heads up!</AlertTitle>\n  <AlertDescription>\n    You can add components and dependencies to your app using the CLI.\n  </AlertDescription>\n  <AlertAction>\n    <Button variant=\"outline\">Enable</Button>\n  </AlertAction>\n</Alert>","tags":["Alert","AlertAction","AlertDescription","AlertTitle"],"parts":[],"props":[{"name":"variant","type":"'default' | 'destructive' | null | undefined","required":false,"default":"default"}],"events":[],"keyboard":[],"accessibilityNotes":["`Alert` renders with `role=\"alert\"`, so assistive technology announces its content as soon as it mounts — reserve it for messages the user genuinely needs to know about immediately, not routine or decorative content.","`role=\"alert\"` implies an assertive live region: screen readers interrupt their current announcement to read it. For less urgent, non-interrupting updates use a `role=\"status\"` region instead of `Alert`.","The component is a static callout, not a dialog — it has no focus management and no keyboard interaction of its own. When `AlertAction` contains an interactive element (e.g. a `Button`), that element follows normal tab order and standard button keyboard semantics."],"examples":[{"id":"alert-demo","title":"Default","source":"import Alert from \"@marko-ui/shadcn/ui/alert/alert.marko\";\nimport AlertTitle from \"@marko-ui/shadcn/ui/alert/title.marko\";\nimport AlertDescription from \"@marko-ui/shadcn/ui/alert/description.marko\";\n\n<Alert>\n  <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n    <path d=\"M12 2 L22 20 L2 20 Z\"/>\n    <line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\"/>\n    <line x1=\"12\" y1=\"17\" x2=\"12.01\" y2=\"17\"/>\n  </svg>\n  <AlertTitle>Heads up!</AlertTitle>\n  <AlertDescription>You can add components to your app using the CLI.</AlertDescription>\n</Alert>","description":"An alert with an icon, title, and description."},{"id":"alert-basic","title":"Basic","source":"import Alert from \"@marko-ui/shadcn/ui/alert/alert.marko\";\nimport AlertTitle from \"@marko-ui/shadcn/ui/alert/title.marko\";\nimport AlertDescription from \"@marko-ui/shadcn/ui/alert/description.marko\";\n\n<Alert class=\"max-w-md\">\n  <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n    <circle cx=\"12\" cy=\"12\" r=\"10\"/>\n    <path d=\"m9 12 2 2 4-4\"/>\n  </svg>\n  <AlertTitle>Account updated successfully</AlertTitle>\n  <AlertDescription>\n    Your profile information has been saved. Changes will be reflected immediately.\n  </AlertDescription>\n</Alert>","description":"A basic alert with an icon, title, and description."},{"id":"alert-without-icon","title":"Without icon","source":"import Alert from \"@marko-ui/shadcn/ui/alert/alert.marko\";\nimport AlertTitle from \"@marko-ui/shadcn/ui/alert/title.marko\";\nimport AlertDescription from \"@marko-ui/shadcn/ui/alert/description.marko\";\n\n<Alert>\n  <AlertTitle>Deployment scheduled</AlertTitle>\n  <AlertDescription>Your changes will go live in the next release window.</AlertDescription>\n</Alert>","description":"The icon column collapses automatically when the alert has no icon."},{"id":"alert-destructive","title":"Destructive","source":"import Alert from \"@marko-ui/shadcn/ui/alert/alert.marko\";\nimport AlertTitle from \"@marko-ui/shadcn/ui/alert/title.marko\";\nimport AlertDescription from \"@marko-ui/shadcn/ui/alert/description.marko\";\n\n<Alert variant=\"destructive\">\n  <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n    <circle cx=\"12\" cy=\"12\" r=\"10\"/>\n    <line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"12\"/>\n    <line x1=\"12\" y1=\"16\" x2=\"12.01\" y2=\"16\"/>\n  </svg>\n  <AlertTitle>Unable to process your payment.</AlertTitle>\n  <AlertDescription>\n    <p>Please verify your billing information and try again.</p>\n    <p>If the issue persists, please contact support.</p>\n  </AlertDescription>\n</Alert>","description":"Use `variant=\"destructive\"` for errors that need urgent attention."},{"id":"alert-action","title":"Action","source":"import Alert from \"@marko-ui/shadcn/ui/alert/alert.marko\";\nimport AlertAction from \"@marko-ui/shadcn/ui/alert/action.marko\";\nimport AlertTitle from \"@marko-ui/shadcn/ui/alert/title.marko\";\nimport AlertDescription from \"@marko-ui/shadcn/ui/alert/description.marko\";\nimport Button from \"@marko-ui/shadcn/ui/button/button.marko\";\n\n<Alert class=\"max-w-md\">\n  <AlertTitle>Dark mode is now available</AlertTitle>\n  <AlertDescription>\n    Enable it under your profile settings to get started.\n  </AlertDescription>\n  <AlertAction>\n    <Button type=\"button\" size=\"xs\" variant=\"default\">Enable</Button>\n  </AlertAction>\n</Alert>","description":"Use `AlertAction` to add a button or other action element to the alert."},{"id":"alert-colors","title":"Custom Colors","source":"import Alert from \"@marko-ui/shadcn/ui/alert/alert.marko\";\nimport AlertTitle from \"@marko-ui/shadcn/ui/alert/title.marko\";\nimport AlertDescription from \"@marko-ui/shadcn/ui/alert/description.marko\";\n\n<Alert class=\"max-w-md border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-50\">\n  <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n    <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\"/>\n    <path d=\"M12 9v4\"/>\n    <path d=\"M12 17h.01\"/>\n  </svg>\n  <AlertTitle>Your subscription will expire in 3 days.</AlertTitle>\n  <AlertDescription>\n    Renew now to avoid service interruption or upgrade to a paid plan to continue using the service.\n  </AlertDescription>\n</Alert>","description":"Customize the alert colors by adding custom classes such as `bg-amber-50 dark:bg-amber-950` to the `Alert` component."},{"id":"alert-rtl","title":"RTL","source":"import Alert from \"@marko-ui/shadcn/ui/alert/alert.marko\";\nimport AlertTitle from \"@marko-ui/shadcn/ui/alert/title.marko\";\nimport AlertDescription from \"@marko-ui/shadcn/ui/alert/description.marko\";\n\n<div dir=\"rtl\" class=\"grid w-full max-w-md items-start gap-4\">\n  <Alert>\n    <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n      <circle cx=\"12\" cy=\"12\" r=\"10\"/>\n      <path d=\"m9 12 2 2 4-4\"/>\n    </svg>\n    <AlertTitle>تم الدفع بنجاح</AlertTitle>\n    <AlertDescription>\n      تمت معالجة دفعتك البالغة 29.99 دولارًا. تم إرسال إيصال إلى عنوان بريدك الإلكتروني.\n    </AlertDescription>\n  </Alert>\n  <Alert>\n    <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n      <circle cx=\"12\" cy=\"12\" r=\"10\"/>\n      <path d=\"M12 16v-4\"/>\n      <path d=\"M12 8h.01\"/>\n    </svg>\n    <AlertTitle>ميزة جديدة متاحة</AlertTitle>\n    <AlertDescription>\n      لقد أضفنا دعم الوضع الداكن. يمكنك تفعيله في إعدادات حسابك.\n    </AlertDescription>\n  </Alert>\n</div>","description":"Alert has no directional logic of its own — icon placement and text flow follow the ambient `dir` attribute."}],"importInstallCommand":"bun add @marko-ui/shadcn marko-zag","requires":["button","icon"],"nativeAttributes":"div","subcomponents":[{"name":"action","props":[],"nativeAttributes":"div"},{"name":"description","props":[],"nativeAttributes":"div"},{"name":"title","props":[],"nativeAttributes":"div"}],"composition":"<Alert> lays out its content in a CSS grid: an optional leading icon\ncolumn (any element passed as a direct child that isn't `AlertTitle`/\n`AlertDescription`/`AlertAction` — typically an `<svg>`), title and\ndescription rows, and `AlertAction` positioned in the top-right corner.\nThe icon column collapses automatically when no icon is present (see the\n\"Without icon\" example below).\n\n```text\nAlert\n├── Icon\n├── AlertTitle\n├── AlertDescription\n└── AlertAction\n```"}
