ZeroGravity UI

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
size
tone
4 pxdepth
3 pxnotch
disabled

Usage

TSX
import { Keycap } from "zerogravity/keycap"

<Keycap>
    Deploy
</Keycap>

Generated from the controls above. Only props that differ from their defaults are shown.

Props

8 documented props on Keycap
PropertyTypeDefaultDescription
size"sm" | "md" | "lg""md"Size.
tonestring"#4ee1f2"Tone.
depthnumber4Depth. Range 0 to 10 px.
notchnumber3Notch. Range 0 to 6 px.
disabledbooleanfalseDisabled.
variant"solid" | "outline" | "ghost""solid"Filled cap, accent outline, or no frame until hovered.
childrenReactNode—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.