Signature
HazardTape
Diagonal signal/black warning banner.
● LIVE
Restricted Subnet
Caution // Black ICE
Breach Detected
"use client";import { HazardTape } from "@/registry/okibi/ui/hazard-tape";export default function HazardTapeDemo() { return ( <div className="flex w-full max-w-sm flex-col gap-3"> <HazardTape variant="signal">Restricted Subnet</HazardTape> <HazardTape variant="warning">Caution // Black ICE</HazardTape> <HazardTape variant="destructive">Breach Detected</HazardTape> </div> );}npx shadcn@latest add https://okibi.cndr.dev/r/hazard-tape.jsonInstallation
Install the theme first, then add the component:
npx shadcn@latest add https://okibi.cndr.dev/r/hazard-tape.jsonCopy the source from the Code tab above into components/ui/hazard-tape.tsx. It uses the cn helper and the okibi theme tokens — install the theme first if you haven't.
Usage
import { HazardTape } from "@/components/ui/hazard-tape"
<HazardTape variant="warning">Restricted Sector</HazardTape>Examples
Variants
Three striped accents — signal, warning, and destructive — for escalating severity banners.
● LIVE
Restricted Channel
Caution // Flux Surge
Uplink Breach Detected
"use client";import { HazardTape } from "@/registry/okibi/ui/hazard-tape";export default function VariantsDemo() { return ( <div className="flex w-full max-w-md flex-col gap-3"> <HazardTape variant="signal">Restricted Channel</HazardTape> <HazardTape variant="warning">Caution // Flux Surge</HazardTape> <HazardTape variant="destructive">Uplink Breach Detected</HazardTape> </div> );}API Reference
HazardTape
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "signal" | "warning" | "destructive" | "signal" | Striped accent / severity. |
Accessibility
- Exposed as
role='img'with an accessible name taken from an explicitaria-label, or derived from string or number children. - With no resolvable name the
imgrole is dropped so the visible uppercase label is read naturally instead of an image with no name. - Pass an explicit
aria-labelwhenever children are not a plain string — otherwise the banner has no accessible name. - The two striped bands are purely decorative and marked
aria-hidden; only the centered label carries meaning. - Static and non-interactive by design — there is no focus, hover, or motion behavior to announce.
Guidelines
Do
- Keep labels short, uppercase warning straps like
Restricted SectororHigh Voltage. - Match the
variantto severity:signalfor notices,warningfor caution,destructivefor danger. - Provide an
aria-labelwhen the visible label is an icon or other non-string content.
Don't
- Do not pass long paragraphs or rich nodes expecting them to become the accessible name.
- Do not use it as an interactive control — it is a decorative banner, not a button or alert.
- Do not recolor the stripes by hand; the variants already pair each accent with the shared dark band.