Skip to content

COMPONENT / stat-band

Stat Band_

Signal-coloured ribbon of big numbers and mono labels, split by hard ground-deep rules that hold at any wrap. Requires @cybr/tokens.

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/stat-band

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

Preview

MVP COMPONENTS
030
CATEGORIES
06
BORDER RADIUS
0PX
BLURRED SHADOWS
0

Props

Component props
PropTypeDefaultDescription
stats{ value: ReactNode; label: ReactNode }[]—One entry per stat, in reading order. Values can be any node, such as a TelemetryCounter.
classNamestring—Extra classes, merged after the defaults with cn().
...propsOmit<ComponentProps<"dl">, "children">—Every other native <dl> attribute is forwarded.

Usage

Needs the stylesheet from @cybr/tokens. After the install, import it in app/globals.css:

@import "tailwindcss";
@import "../styles/cybr-tokens.css";
import { StatBand } from "@/components/ui/stat-band";
import { TelemetryCounter } from "@/components/ui/telemetry-counter";

export function Stats() {
  return (
    <StatBand
      stats={[
        { value: "030", label: "MVP COMPONENTS" },
        { value: <TelemetryCounter value={6} minDigits={2} />, label: "CATEGORIES" },
      ]}
    />
  );
}

Anatomy

Accessibility