BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/neobrutalism/alert

alert

neobrutalism/alert
FreeComponent

neobrutalism publishes no description for this item.

Live preview

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

Install it

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

Source

alert.tsxneobrutalism.com/r/alert.json
1import * as React from "react"
2import { cva, type VariantProps } from "class-variance-authority"
3
4import { cn } from "@/lib/utils"
5
6// CSS-grid layout (shadcn-style): drop an icon as a direct child and the alert
7// auto-arranges into an icon column + a content column — no manual flex wrapper.
8// `has-[>svg]` adds the icon column only when an icon is present. NeoBrutalist
9// chrome: hard 2px border, square corners, hard offset shadow.
10const alertVariants = cva(
11 cn(
12 "group/alert relative grid w-full grid-cols-[0_1fr] items-start gap-y-1 rounded border-2 px-4 py-3 text-left text-sm shadow-md",
13 "has-[>svg]:grid-cols-[1.25rem_1fr] has-[>svg]:gap-x-3",
14 "has-data-[slot=alert-action]:pr-14",
15 "[&>svg]:size-5 [&>svg]:translate-y-0.5 [&>svg]:shrink-0 [&>svg]:text-current"
16 ),
17 {
18 variants: {
19 // shadcn's variant axis (kept for API compatibility). `solid` is a Neobrutalism
20 // addition.
21 variant: {
22 default:
23 "border-border bg-background text-foreground *:data-[slot=alert-description]:text-muted-foreground",
24 destructive:
25 "border-red-900 bg-red-300 text-red-900 *:data-[slot=alert-description]:text-red-900/80",
26 solid:
27 "border-border bg-foreground text-background *:data-[slot=alert-description]:text-background/80",
28 },
29 // Neobrutalism status axis — additive; overrides the variant's colors when set.
30 status: {
31 error:
32 "border-red-900 bg-red-300 text-red-900 *:data-[slot=alert-description]:text-red-900/80",
33 success:
34 "border-green-900 bg-green-300 text-green-900 *:data-[slot=alert-description]:text-green-900/80",
35 warning:
36 "border-yellow-900 bg-yellow-300 text-yellow-900 *:data-[slot=alert-description]:text-yellow-900/80",
37 info: "border-blue-900 bg-blue-300 text-blue-900 *:data-[slot=alert-description]:text-blue-900/80",
38 },
39 },
40 defaultVariants: {
41 variant: "default",
42 },
43 }
44)
45
46function Alert({
47 className,
48 variant,
49 status,
50 ...props
51}: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
52 return (
53 <div
54 data-slot="alert"
55 role="alert"
56 className={cn(alertVariants({ variant, status }), className)}
57 {...props}
58 />
59 )
60}
61
62function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
63 return (
64 <div
65 data-slot="alert-title"
66 className={cn(
67// … truncated

What it pulls in

npm packages

  • @base-ui/react
  • class-variance-authority

Files it writes

  • alert.tsx

Facts

Registry
neobrutalism
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

Docs on neobrutalism neobrutalism.com neobrutalism/neobrutalism on GitHub Raw registry item This item as JSON

More from neobrutalism

All 54 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
accordionaccordionneobrutalismComponentsFree2 deps
alert-dialogalert-dialogneobrutalismComponentsFree1 dep
aspect-ratioaspect-rationeobrutalismComponentsFree1 dep
avataravatarneobrutalismComponentsFree1 dep
badgebadgeneobrutalismComponentsFree2 deps
breadcrumbbreadcrumbneobrutalismComponentsFree2 deps
buttonbuttonneobrutalismComponentsFree2 deps
button-groupbutton-groupneobrutalismComponentsFree2 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

ToolDrift

What the AI coding tools changed last night

tooldrift.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 ToolDrift

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 ToolDrift

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 ToolDrift

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