Skip to content

COMPONENT / spec-card

Spec Card_

Product card with a meta header and barcode, a big title, description, action link and spec list on a solid signal offset shadow. 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/spec-card

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

Preview

UNIT / D-01 · REV 2.6

Core module

[Short product or feature description goes here, two lines at most.]

VIEW SPEC →
STATUS
ONLINE
CLASS
[VALUE]
SECTOR
[VALUE]
BUILD
[VALUE]

Props

Component props
PropTypeDefaultDescription
titleReactNode—Card title, set in the display face.
titleAs"h2" | "h3" | "h4""h3"Heading level for the title. Match it to the page outline.
metaReactNode—Header text, such as a unit code and revision.
specs{ label: ReactNode; value: ReactNode; accent?: boolean }[]—Spec list rows. accent colours the value in --signal. The list is left out when empty.
actionReactNode—Action under the description, usually a SpecCardAction.
childrenReactNode—The description: plain text or your own paragraphs.
...propsOmit<ComponentProps<"article">, "title">—Every other native <article> attribute is forwarded; className is merged last with cn().
SpecCardAction ...propsComponentProps<"a">—A styled native <a>. Pass href and children; className is merged last.

Usage

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

@import "tailwindcss";
@import "../styles/cybr-tokens.css";
import { SpecCard, SpecCardAction } from "@/components/ui/spec-card";

export function Module() {
  return (
    <SpecCard
      meta="UNIT / D-01 · REV 2.6"
      title="Core module"
      action={<SpecCardAction href="/modules/core">VIEW SPEC →</SpecCardAction>}
      specs={[{ label: "STATUS", value: "ONLINE", accent: true }]}
    >
      Hardened compute node for the edge.
    </SpecCard>
  );
}

Anatomy

Accessibility