Interfacestable
Keycap
Pixel button
A native button with notched pixel corners, a hard cast shadow it presses into, and a block sweep on hover.
Last press: none
Customize
Capsize, accent and press geometry
sizetone4 px
depth3 px
notchdisabledUsage
import { Keycap } from "zerogravity/keycap"
<Keycap>
Deploy
</Keycap>Generated from the controls above. Only props that differ from their defaults are shown.
Props
| Property | Type | Default | Description |
|---|---|---|---|
size | "sm" | "md" | "lg" | "md" | Size. |
tone | string | "#4ee1f2" | Tone. |
depth | number | 4 | Depth. Range 0 to 10 px. |
notch | number | 3 | Notch. Range 0 to 6 px. |
disabled | boolean | false | Disabled. |
variant | "solid" | "outline" | "ghost" | "solid" | Filled cap, accent outline, or no frame until hovered. |
children | ReactNode | — | Button label. Every native button attribute is passed through. |
type | "button" | "submit" | "reset" | "button" | Defaults to button, so a Keycap inside a form never submits by accident. |
Dependencies
0 external runtime dependencies
Ships with nothing but React.