Skip to content

COMPONENT / stepped-wipe-reveal

Stepped Wipe Reveal_

Block line that wipes in left to right on 12 hard steps the first time it scrolls into view, with an optional stagger delay. 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/stepped-wipe-reveal

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

Preview

Raw.Loud.Lit.

Props

Component props
PropTypeDefaultDescription
delaynumber0Milliseconds to wait, after it comes into view, before the wipe starts. Use 300ms steps to stagger lines.
childrenReactNode—The content to reveal. It is always in the DOM.
classNamestring—Extra classes, merged after the defaults with cn().
...propsComponentProps<"span">—Every other native <span> attribute and ref is forwarded.

Usage

Needs both stylesheets from @cybr/tokens and @cybr/effects, and @cybr/use-reduced-motion arrives with them. After the install, import them in app/globals.css:

@import "tailwindcss";
@import "../styles/cybr-tokens.css";
@import "../styles/cybr-effects.css";
import { SteppedWipeReveal } from "@/components/ui/stepped-wipe-reveal";

export function Slogan() {
  return (
    <h2 className="font-display text-5xl uppercase">
      <SteppedWipeReveal>Raw.</SteppedWipeReveal>
      <SteppedWipeReveal delay={300}>Loud.</SteppedWipeReveal>
    </h2>
  );
}

Behaviour

Accessibility