Stamp Key
Web (React)
A theme-inked key that presses into its base and lights its index tick on hover.
A key set on a darker plinth: on hover the face presses down into the base and its index tick lights up, and on press it bottoms out. The primary key is inked in the theme's primary colour; the secondary key is a paper card with a hairline. Labels are uppercase mono, and both keys follow the active palette in light and dark mode.
Installation
CLI
npx @modus-ui/cli add stamp-keyManual
- Copy the code from the component tab.
- Create a file at
components/ui/stamp-key.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "primary" | "secondary" | "primary" | Ink-filled primary key or paper secondary key. |
label | string | "Commit" (primary) or "Save as draft" (secondary) | Button text. |
onClick | MouseEventHandler<HTMLButtonElement> | — | Click handler for the button. |
Comments