Skip to content

COMPONENT / warning-tape

Warning Tape_

Tilted hazard-stripe tape with scrolling label chips, or a static stripe band without items. Pauses on hover, focus and button; static under reduced motion. Requires @cybr/tokens and @cybr/effects.

Install

  1. 1. Map the @cybr namespace, once per project. Add this inside your components.json, or into its existing "registries" object. No components.json yet? Run npx shadcn@latest init first to create one.

    "registries": { "@cybr": "https://cybr-ui.com/r/{name}.json" }
  2. 2. Add components:

    $ npx shadcn@latest add @cybr/warning-tape

If shadcn reports Unknown registry "@cybr", step 1 is missing from that project's components.json.

Preview

  • CAUTION // UNDER CONSTRUCTION
  • RESTRICTED SECTOR
  • CAUTION // UNDER CONSTRUCTION
  • RESTRICTED SECTOR

Props

Component props
PropTypeDefaultDescription
itemsReactNode[][]Label chips that scroll along the tape. Without items, the tape is a static, decorative band.
variant"signal" | "ink""signal"Signal is the 40px hazard tape. Ink is the thinner ink-striped tape.
tiltnumber-2.5Rotation in degrees. The tape overhangs each side by 40px so the ends stay hidden.
durationnumber20Seconds for one full loop.
reversebooleantrueScroll left to right, as on the artboard. Set false for right to left.
pauseControlbooleantrueShow the PAUSE/PLAY button when there are items.
...propsOmit<ComponentProps<"div">, "children">—Every other native <div> attribute is forwarded, such as aria-label; className is merged last with cn(). Set the background behind the tape here.

Usage

Needs the stylesheets from @cybr/tokens and @cybr/effects. After the install, import them in app/globals.css:

@import "tailwindcss";
@import "../styles/cybr-tokens.css";
@import "../styles/cybr-effects.css";
import { WarningTape } from "@/components/ui/warning-tape";

export function Construction() {
  return <WarningTape className="bg-ground-deep" items={["CAUTION // UNDER CONSTRUCTION", "RESTRICTED SECTOR"]} />;
}

States

Accessibility