Account

Buttons

Creative

Border Beam Button

For the secondary action that still deserves to be found. Built on Border Beam.

Install

Included with Creative: needs your API key. Initialize and log in once.

Terminal
npx @galactrex/ui add border-beam-button

Usage

Example
import { BorderBeamButton } from "@/components/galactrex/border-beam-button";

<BorderBeamButton onClick={openDocs}>Read the docs</BorderBeamButton>

Source

Installs to components/galactrex/border-beam-button.tsx, with the shared motion primitives beside it.

Source for this component comes with its plan. Install it with the command above, or open your licensed copy here.

See plans

Props

PropTypeDefaultDescription
childrenReactNode—Label.
durationnumber4Seconds per lap.
lengthnumber0.22Beam length as a share of the lap.
...button propsButtonHTMLAttributes—onClick, disabled, type and the rest.

Variants

  • Secondary. Next to a solid primary button.

Accessibility

  • A real button; the beam is decorative.

Motion and reduced motion

  • Border Beam's single-layer rotation; pauses offscreen.
  • Reduced motion: the beam holds still.