Button preview
Interactive preview of the CyberSpec Button component. A cut-corner button with a raised tab, five tones, and a press flash. Enable the cipher prop to scramble the label and briefly tear the frame on hover.
About this preview
Button belongs to the Actions group in the CyberSpec catalog. It uses @ui-sdk/react/button.
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/button.json
Example
"use client"
import { Crosshair } from "lucide-react"
import { Button } from "@/components/ui/button"
const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))
export default function ButtonDemo() {
return (
<>
<Button tone="primary">Deploy</Button>
<Button>Abort</Button>
<Button tone="signal" cipher onClick={() => wait(1400)} pendingAnnouncement="Scanning">
Scan
</Button>
<Button tone="flag">Accept</Button>
<Button icon aria-label="Lock on">
<Crosshair aria-hidden />
</Button>
<Button disabled>Offline</Button>
<Button cipher>Cipher button</Button>
</>
)
}
Install this example
bunx --bun shadcn@latest add https://www.cyberspec.dev/r/button-demo.json