Halo Trace
Web (React)
A mono pill whose hairline is traced by a slow beam of the theme's primary colour.
A card-coloured pill with an uppercase mono label and a status dot. A beam of the theme's primary colour continuously traces its hairline border; on hover the beam brightens, the dot and label ink in, the pill lifts and the arrow nudges outward. It follows the active theme and palette in light and dark mode. Animations and transitions are turned off when the user prefers reduced motion.
Installation
CLI
npx @modus-ui/cli add halo-traceManual
- Install
framer-motion. - Copy the code from the component tab.
- Create a file at
components/ui/halo-trace.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | "Send for review" | Button text. |
beamColor | string | "hsl(var(--primary))" | Colour of the spinning border beam. |
speed | number | 4 | Seconds per beam rotation. |
onClick | MouseEventHandler<HTMLButtonElement> | undefined | Click handler. |
Comments