BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn/ui/alert

alert

agentmesh/alert
FreeComponent

shadcn/ui publishes no description for this item.

Live preview

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

Install it

npx shadcn@latest add https://raw.githubusercontent.com/ombhanushaliii/agentmesh/main/example/ui/apps/v4/public/r/styles/base-vega/alert.json

Source

registry/base-vega/ui/alert.tsxraw.githubusercontent.com/ombhanushaliii/agentmesh/main/example/ui/apps/v4/public/r/styles/base-vega/alert.json
1import * as React from "react"
2import { cva, type VariantProps } from "class-variance-authority"
3
4import { cn } from "@/registry/base-vega/lib/utils"
5
6const alertVariants = cva(
7 "group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
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
22function Alert({
23 className,
24 variant,
25 ...props
26}: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
27 return (
28 <div
29 data-slot="alert"
30 role="alert"
31 className={cn(alertVariants({ variant }), className)}
32 {...props}
33 />
34 )
35}
36
37function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
38 return (
39 <div
40 data-slot="alert-title"
41 className={cn(
42 "font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",
43 className
44 )}
45 {...props}
46 />
47 )
48}
49
50function AlertDescription({
51 className,
52 ...props
53}: React.ComponentProps<"div">) {
54 return (
55 <div
56 data-slot="alert-description"
57 className={cn(
58 "text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
59 className
60 )}
61 {...props}
62 />
63 )
64}
65
66function AlertAction({ className, ...props }: React.ComponentProps<"div">) {
67 return (
68 <div
69 data-slot="alert-action"
70 className={cn("absolute top-2.5 right-3", className)}
71 {...props}
72 />
73 )
74}
75
76export { Alert, AlertTitle, AlertDescription, AlertAction }

Files it writes

  • registry/base-vega/ui/alert.tsx

Facts

Registry
shadcn/ui
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-01
Last confirmed
3 days ago

Go to the source

Docs on shadcn/ui ombhanushaliii/agentmesh on GitHub Raw registry item This item as JSON

More from shadcn/ui

All 201 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
accordionaccordionshadcn/uiComponentsFreeno deps
alert-dialogalert-dialogshadcn/uiComponentsFreeno deps
aspect-ratioaspect-ratioshadcn/uiComponentsFreeno deps
avataravatarshadcn/uiComponentsFreeno deps
badgebadgeshadcn/uiComponentsFreeno deps
breadcrumbbreadcrumbshadcn/uiComponentsFreeno deps
buttonbuttonshadcn/uiComponentsFreeno deps
button-groupbutton-groupshadcn/uiComponentsFreeno deps
BlockDex

Built by

Kynth Studio

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

BlockDex

BlockDex

Built by

Kynth Studio

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

BlockDex

BlockDex

Built by

Kynth Studio

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

BlockDex