Skip to content

COMPONENT / hardware-panel

Hardware Panel_

Riveted surface panel with a cable channel and status rows that pair ON/OFF text with a signal LED. 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/hardware-panel

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

Preview

PWR / BUS 04

MAINON
AUXOFF
UPLINKON

Props

Component props
PropTypeDefaultDescription
titleReactNode—Panel title, set in the display face.
titleAs"h2" | "h3" | "h4""h3"Heading level for the title. Match it to the page outline.
childrenReactNode—Panel content, stacked with a 10px gap. Usually HardwarePanelStatus rows.
...propsOmit<ComponentProps<"section">, "title">—Every other native <section> attribute is forwarded; className is merged last with cn().
HardwarePanelStatus labelReactNode—Row label, such as MAIN.
HardwarePanelStatus onboolean—Lights the LED and sets the default state text.
HardwarePanelStatus stateLabelReactNode"ON" | "OFF"State text shown before the LED. Defaults from on.
HardwarePanelStatus ...propsOmit<ComponentProps<"div">, "children">—Every other native <div> attribute is forwarded to the row.

Usage

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

@import "tailwindcss";
@import "../styles/cybr-tokens.css";
import { HardwarePanel, HardwarePanelStatus } from "@/components/ui/hardware-panel";

export function Power({ uplink }: { uplink: boolean }) {
  return (
    <HardwarePanel title="PWR / BUS 04">
      <HardwarePanelStatus label="MAIN" on />
      <HardwarePanelStatus label="UPLINK" on={uplink} />
    </HardwarePanel>
  );
}

Anatomy

Accessibility