Skip to content

COMPONENT / hard-offset-button

Hard-Offset Button_

Signal-filled button with a solid offset shadow that steps in on hover and presses flush on click. 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/hard-offset-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.
classNamestring—Extra classes, merged after the defaults with cn().
disabledbooleanfalseNative disabled. Drops the shadow and shows the dashed offline style.
...propsComponentProps<"button">—Every other native <button> attribute, ref and event handler is forwarded.

Usage

import { HardOffsetButton } from "@/components/ui/hard-offset-button";

export function Cta() {
  return <HardOffsetButton onClick={() => console.log("deploy")}>Deploy now</HardOffsetButton>;
}

States

Accessibility