Skip to content

COMPONENT / classified-card

Classified Card_

Dashed dossier frame with a rotated stamp and inline redaction bars that declassify on click. Visual only: never for real secrets. 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/classified-card

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

Preview

REDACTED

Subject entered 0300 hrs and relay.

CLICK BAR TO DECLASSIFY

Props

Component props
PropTypeDefaultDescription
stampReactNode"REDACTED"Rotated stamp at the top. Pass null to hide it.
hintReactNode—Small line under the body, such as an instruction.
childrenReactNode—Body text. Wrap words in <Redacted> to black them out.
...propsComponentProps<"div">—Every other native <div> attribute is forwarded; className is merged last with cn().
Redacted childrenReactNode—The hidden text.
Redacted ...propsOmit<ComponentProps<"button">, "children" | "type">—Forwarded to the bar's <button> while it is concealed. Call preventDefault in onClick to keep it concealed.

Usage

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

@import "tailwindcss";
@import "../styles/cybr-tokens.css";
import { ClassifiedCard, Redacted } from "@/components/ui/classified-card";

export function Dossier() {
  return (
    <ClassifiedCard hint="CLICK BAR TO DECLASSIFY">
      Subject entered <Redacted>sector nine at</Redacted> 0300 hrs.
    </ClassifiedCard>
  );
}

States

Accessibility