Skip to content

COMPONENT / boot-sequence-loader

Boot Sequence Loader_

Terminal boot log that prints one line at a time, fills each status in --signal and ends on a blinking cursor. Shows the full log 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/boot-sequence-loader

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

Preview

[0000.77] handshake uplink READY

Props

Component props
PropTypeDefaultDescription
lines{ text: string; status: string }[]—Log lines in order. text prints in --label; status is appended in --signal once the line completes. Include any dot leaders and trailing space in text.
lineDurationnumber1000Milliseconds per line. Values that are not finite or not above 0 fall back to 1000.
onComplete() => void—Called once after the last status fills in, or straight after mount under reduced motion.
classNamestring—Extra classes, merged after the defaults with cn().
...propsOmit<ComponentProps<"div">, "children">—Every other native <div> 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 { BootSequenceLoader } from "@/components/ui/boot-sequence-loader";

export function Splash({ onReady }: { onReady: () => void }) {
  return (
    <BootSequenceLoader
      onComplete={onReady}
      lines={[
        { text: "[0000.01] init kernel ...... ", status: "OK" },
        { text: "[0000.42] handshake uplink . ", status: "READY" },
      ]}
    />
  );
}

Behaviour

Accessibility