Skip to content

COMPONENT / terminal-navbar

Terminal Navbar_

Primary nav bar with a display wordmark, mono links split by rules, a [ BRACKETED ] current link and an actions slot for a ⌘K hint or a solid --signal CTA. Folds into a MENU toggle panel when narrow. 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/terminal-navbar

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

Preview

Props

Component props
PropTypeDefaultDescription
links{ label: string; href: string; current?: boolean }[]—Links in order. The one with current: true gets aria-current="page" and shows as [ LABEL ] in --signal.
brandReactNodeCYBR//UIWordmark content, set in the display font.
brandHrefstring"/"Where the wordmark links to.
actionsReactNode—Right-hand slot that never scrolls, for a ⌘K hint or a TerminalNavbarCta. Moves to the bottom of the MENU panel when the navbar is narrow.
childrenReactNode—Rendered after the links, for extra triggers such as a Brutal Mega Menu. Moves into the MENU panel with the links when the navbar is narrow.
aria-labelstring"Primary"Name of the navigation landmark. Give each <nav> on a page a different name.
classNamestring—Extra classes, merged after the defaults with cn().
...propsComponentProps<"nav">—Every other native <nav> attribute is forwarded. Your onKeyDown and onPointerDown run before the menu's own handling.
TerminalNavbarCtaComponentProps<"a">—Solid --signal link styled for the actions slot. Pass href and children.

Usage

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

@import "tailwindcss";
@import "../styles/cybr-tokens.css";
import { TerminalNavbar, TerminalNavbarCta } from "@/components/ui/terminal-navbar";

export function SiteNav() {
  return (
    <TerminalNavbar
      links={[
        { label: "INDEX", href: "/" },
        { label: "DOCS", href: "/docs", current: true },
      ]}
      actions={<TerminalNavbarCta href="/install">INSTALL →</TerminalNavbarCta>}
    />
  );
}

Links are plain <a> elements. To use client-side routing, edit the installed source and swap them for your framework's link component.

States

Accessibility