BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/octane/alert

Alert

octane/alert
FreeComponent

octane publishes no description for this item.

Live preview

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

Install it

npx shadcn@latest add https://raw.githubusercontent.com/octanejs/octane/main/packages/shadcn/registry/alert.json

Source

ui/alert.tsrxraw.githubusercontent.com/octanejs/octane/main/packages/shadcn/registry/alert.json
1// Base UI base alert — structure and cva strings from upstream `bases/base-ui/ui/alert.tsx`.
2//
3// Alert uses no headless primitive in any base, and this file's nine string literals were
4// verified byte-identical to the React Aria base's `alert.tsrx`. That is a finding, not an
5// assumption: the two bases DO diverge elsewhere (the Radix base's Skeleton is `bg-accent`
6// where aria's is `bg-muted`), so identity is checked per component rather than inherited.
7//
8// Octane adaptations: `React.ComponentProps<'div'>` → the package's `DivProps`; no
9// `"use client"` (octane has no Server Components). Pure template JSX, no consumer-children
10// interleave, so every part uses the `@{ … }` shorthand.
11import { cva, type VariantProps } from 'class-variance-authority';
12
13import { cn } from '@/lib/utils';
14import type { DivProps } from '@/lib/types';
15
16export const alertVariants = cva(
17 'group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 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 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*=\'size-\'])]:size-4',
18 {
19 variants: {
20 variant: {
21 default: 'bg-card text-card-foreground',
22 destructive: 'bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current',
23 },
24 },
25 defaultVariants: {
26 variant: 'default',
27 },
28 },
29);
30
31export interface AlertProps extends DivProps {
32 variant?: VariantProps<typeof alertVariants>['variant'];
33}
34
35export function Alert({ className, variant, ...props }: AlertProps) @{
36 <div
37 data-slot="alert"
38 role="alert"
39 className={cn(alertVariants({ variant }), className)}
40 {...props}
41 />
42}
43
44export function AlertTitle({ className, ...props }: DivProps) @{
45 <div
46 data-slot="alert-title"
47 className={cn(
48 'font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground',
49 className,
50 )}
51 {...props}
52 />
53}
54
55export function AlertDescription({ className, ...props }: DivProps) @{
56 <div
57 data-slot="alert-description"
58 className={cn(
59 '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',
60 className,
61 )}
62 {...props}
63 />
64}
65
66export function AlertAction({ className, ...props }: DivProps) @{
67// … truncated

What it pulls in

npm packages

  • class-variance-authority

Other registry items

  • @octane/types
  • @octane/utils

Files it writes

  • ui/alert.tsrx

Facts

Registry
octane
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 octane octanejs.dev octanejs/octane on GitHub Raw registry item This item as JSON

More from octane

All 44 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionoctaneComponentsFree2 deps
Alert Dialogalert-dialogoctaneComponentsFree1 dep
Aspect Ratioaspect-ratiooctaneComponentsFreeno deps
AvataravataroctaneComponentsFree1 dep
BadgebadgeoctaneComponentsFree1 dep
BreadcrumbbreadcrumboctaneComponentsFree1 dep
ButtonbuttonoctaneComponentsFree2 deps
CardcardoctaneComponentsFreeno 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