BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/boldkit/alert

Alert

boldkit/alert
FreeComponent

Displays a callout for user attention with bold neubrutalism borders

Live preview

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

Install it

npx shadcn@latest add https://boldkit.dev/r/alert.json

Source

registry/default/ui/alert.tsxboldkit.dev/r/alert.json
1import * as React from 'react'
2import { cva, type VariantProps } from 'class-variance-authority'
3import { cn } from '@/lib/utils'
4
5const alertVariants = cva(
6 'relative w-full border-3 border-foreground p-4 shadow-[4px_4px_0px_hsl(var(--shadow-color))] ease-out animate-in fade-in-0 slide-in-from-top-2 duration-300 transition [&>svg~*:not([data-alert-action])]:pl-8 [&>svg~[data-alert-action]]:ml-8 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground',
7 {
8 variants: {
9 variant: {
10 default: 'bg-background text-foreground',
11 destructive: 'bg-destructive text-destructive-foreground [&>svg]:text-destructive-foreground',
12 success: 'bg-success text-success-foreground',
13 warning: 'bg-warning text-warning-foreground',
14 info: 'bg-info text-info-foreground',
15 },
16 },
17 defaultVariants: {
18 variant: 'default',
19 },
20 }
21)
22
23const Alert = React.forwardRef<
24 HTMLDivElement,
25 React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
26>(({ className, variant, ...props }, ref) => (
27 <div
28 ref={ref}
29 role="alert"
30 className={cn(alertVariants({ variant }), className)}
31 {...props}
32 />
33))
34Alert.displayName = 'Alert'
35
36const AlertTitle = React.forwardRef<
37 HTMLHeadingElement,
38 React.HTMLAttributes<HTMLHeadingElement>
39>(({ className, ...props }, ref) => (
40 <h5
41 ref={ref}
42 className={cn('mb-1 font-bold uppercase tracking-wide leading-none', className)}
43 {...props}
44 />
45))
46AlertTitle.displayName = 'AlertTitle'
47
48const AlertDescription = React.forwardRef<
49 HTMLParagraphElement,
50 React.HTMLAttributes<HTMLParagraphElement>
51>(({ className, ...props }, ref) => (
52 <div
53 ref={ref}
54 className={cn('text-sm [&_p]:leading-relaxed', className)}
55 {...props}
56 />
57))
58AlertDescription.displayName = 'AlertDescription'
59
60export interface AlertActionProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
61 /** Shows an inline spinner and disables the button automatically */
62 loading?: boolean
63}
64
65const AlertAction = React.forwardRef<HTMLButtonElement, AlertActionProps>(
66 ({ className, loading, disabled, children, ...props }, ref) => (
67 <button
68 ref={ref}
69 data-alert-action=""
70 disabled={disabled || loading}
71 className={cn(
72 // layout
73 'mt-3 inline-flex items-center gap-1.5 max-w-full min-w-0',
74 // shape — no rounded corners, thin border inheriting text color
75// … truncated

What it pulls in

npm packages

  • class-variance-authority
  • lucide-react

Other registry items

  • @boldkit/utils

Files it writes

  • registry/default/ui/alert.tsx

Facts

Registry
boldkit
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-03
Last confirmed
today

Go to the source

Docs on boldkit boldkit.dev ANIBIT14/boldkit on GitHub Raw registry item This item as JSON

More from boldkit

All 94 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionboldkitComponentsFree2 deps
Alert Dialogalert-dialogboldkitComponentsFree1 dep
ASCII Shapesascii-shapesboldkitComponentsFreeno deps
Aspect Ratioaspect-ratioboldkitComponentsFree1 dep
AvataravatarboldkitComponentsFree1 dep
BadgebadgeboldkitComponentsFree1 dep
BreadcrumbbreadcrumbboldkitComponentsFree2 deps
ButtonbuttonboldkitComponentsFree2 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