Alert preview
Interactive preview of the CyberSpec Alert component. An inline notice on a spined frame: info, success, warning or danger, each with its own glyph.
About this preview
Alert belongs to the Data group in the CyberSpec catalog. It uses markup and CSS.
Installation
Use a React 19 project with shadcn configured. Render the installed components inside the Cyber root, and import your global stylesheet in the app entry point.
bunx --bun shadcn@latest add https://www.cyberspec.dev/r/alert.json
Example
"use client"
import { Alert } from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
export default function AlertDemo() {
return (
<>
<Alert tone="info" title="Handshake complete">
Vanta relay 3F:A2 accepted the key. Traffic is routed through Glasswater.
</Alert>
<Alert tone="success" title="Route cleared">
Dex is parked two blocks out with the engine running.
</Alert>
<Alert
tone="warning"
title="Trace in progress"
action={
<Button size="sm" tone="flag">
Reroute
</Button>
}
>
Someone on Meridian's side is walking the link back. About ninety seconds.
</Alert>
<Alert
tone="danger"
title="Deck overheating"
action={
<Button size="sm" tone="primary">
Vent
</Button>
}
>
Core is at 96% of its thermal limit. Daemons will be dropped to protect the hardware.
</Alert>
</>
)
}
Install this example
bunx --bun shadcn@latest add https://www.cyberspec.dev/r/alert-demo.json