Skip to content

COMPONENT / terminal-button

Terminal Button_

Terminal prompt button with a blinking block cursor that inverts to a signal fill on hover. Requires @cybr/tokens and @cybr/effects.

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-button

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

Preview

Props

Component props
PropTypeDefaultDescription
type"button" | "submit" | "reset""button"Native button type. Defaults to button so it never submits a form by accident.
childrenReactNode—Label text, shown after a "> " prompt and before the block cursor. Not uppercased.
classNamestring—Extra classes, merged after the defaults with cn().
disabledbooleanfalseNative disabled. Shows the dashed offline style with a solid, non-blinking cursor.
...propsComponentProps<"button">—Every other native <button> attribute, ref and event handler is forwarded.

Usage

Needs both stylesheets from @cybr/tokens and @cybr/effects. After the install, import them in app/globals.css:

@import "tailwindcss";
@import "../styles/cybr-tokens.css";
@import "../styles/cybr-effects.css";
import { TerminalButton } from "@/components/ui/terminal-button";

export function Action() {
  return <TerminalButton onClick={() => console.log("run")}>execute</TerminalButton>;
}

States

Accessibility