Buttons
CreativeBorder 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.
npx @galactrex/ui add border-beam-buttonUsage
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.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Label. |
duration | number | 4 | Seconds per lap. |
length | number | 0.22 | Beam length as a share of the lap. |
...button props | ButtonHTMLAttributes | — | 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.