BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/HextaUI/alert

Alert

hextaui/alert
FreeComponent

Displays a status or message banner.

Live preview

live · rendered by the registry
Rendered by HextaUI on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://hextaui.com/r/alert.json

Source

registry/new-york/ui/alert.tsxhextaui.com/r/alert.json
1import { cva, type VariantProps } from "class-variance-authority";
2import type * as React from "react";
3
4import { cn } from "@/lib/utils";
5
6const alertVariants = cva(
7 "relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
8 {
9 variants: {
10 variant: {
11 default: "bg-card text-card-foreground",
12 destructive:
13 "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current",
14 },
15 },
16 defaultVariants: {
17 variant: "default",
18 },
19 }
20);
21
22type LivePoliteness = "polite" | "assertive" | false;
23
24function Alert({
25 className,
26 variant,
27 live = "polite",
28 ...props
29}: React.ComponentProps<"div"> &
30 VariantProps<typeof alertVariants> & { live?: LivePoliteness }) {
31 const liveAttributes =
32 live === "assertive"
33 ? ({
34 role: "alert",
35 "aria-live": "assertive",
36 "aria-atomic": true,
37 } as const)
38 : live === "polite"
39 ? ({
40 role: "status",
41 "aria-live": "polite",
42 "aria-atomic": true,
43 } as const)
44 : ({} as const);
45 return (
46 <div
47 data-slot="alert"
48 {...liveAttributes}
49 className={cn(alertVariants({ variant }), className)}
50 {...props}
51 />
52 );
53}
54
55function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
56 return (
57 <div
58 className={cn(
59 "col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
60 className
61 )}
62 data-slot="alert-title"
63 {...props}
64 />
65 );
66}
67
68function AlertDescription({
69 className,
70 ...props
71}: React.ComponentProps<"div">) {
72 return (
73 <div
74 className={cn(
75 "col-start-2 grid justify-items-start gap-1 text-muted-foreground text-sm [&_p]:leading-relaxed",
76 className
77 )}
78 data-slot="alert-description"
79 {...props}
80 />
81 );
82}
83
84export { Alert, AlertTitle, AlertDescription };

Files it writes

  • registry/new-york/ui/alert.tsx

Facts

Registry
HextaUI
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
In the index
at or before 2026-08-13
Last confirmed
yesterday

Go to the source

Docs on HextaUI hextaui.com preetsuthar17/HextaUI on GitHub Raw registry item This item as JSON

More from HextaUI

All 139 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionHextaUIComponentsFree1 dep
AI Chat Historyai-chat-historyHextaUIComponentsFreeno deps
AI Citationsai-citationsHextaUIComponentsFreeno deps
AI Conversationai-conversationHextaUIComponentsFreeno deps
AI Error Handlerai-error-handlerHextaUIComponentsFreeno deps
AI File Uploadai-file-uploadHextaUIComponentsFreeno deps
AI Messageai-messageHextaUIComponentsFree4 deps
AI Model Selectorai-model-selectorHextaUIComponentsFreeno deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex