Skip to content
Signature

HazardTape

Diagonal signal/black warning banner.

● LIVE
npx shadcn@latest add https://okibi.cndr.dev/r/hazard-tape.json

Installation

Install the theme first, then add the component:

npx shadcn@latest add https://okibi.cndr.dev/r/hazard-tape.json

Copy 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

API Reference

HazardTape

PropTypeDefaultDescription
variant"signal" | "warning" | "destructive""signal"Striped accent / severity.

Accessibility

  • Exposed as role='img' with an accessible name taken from an explicit aria-label, or derived from string or number children.
  • With no resolvable name the img role is dropped so the visible uppercase label is read naturally instead of an image with no name.
  • Pass an explicit aria-label whenever 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 Sector or High Voltage.
  • Match the variant to severity: signal for notices, warning for caution, destructive for danger.
  • Provide an aria-label when 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.

On this page