Hairline CTA
Web (React)
A mono, uppercase hairline button whose primary ink floods up from the baseline on hover.
A mono, uppercase hairline button with an index number and a diagonal arrow. On hover the theme's primary colour floods up from the baseline and the arrow lifts. It follows the active theme and palette, and fills its parent so it can be centred in any container. Transitions are turned off when the user prefers reduced motion.
Installation
CLI
npx @modus-ui/cli add hairline-ctaManual
- Install
framer-motion. - Copy the code from the component tab.
- Create a file at
components/ui/hairline-cta.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | "Read the index" | Button text. |
type | "button" | "submit" | "reset" | "button" | Native button type. |
onClick | MouseEventHandler<HTMLButtonElement> | undefined | Click handler. |
Comments