Crystal Keys
A field of glass keycaps that type themselves, press under the pointer and ripple on a click.
pixikit.com/docs/effects/crystal-keys
Customize
Preset
Colors2 of 10
Background color
Size0.44
Spacing0.32
Stagger0.00
Height0.50
Taper0.72
Radius0.08
Bevel0.050
Dish0.040
Legends
Tilt42°
Angle28°
Center x0.00
Center y0.00
Ior1.50
Dispersion1.60
Density1.00
Frost0.00
Glow1.00
Backlight1.00
Intensity1.00
Light angle0°
Light speed4.0°/s
Blur0.60
Focus0.50
Grain0.30
Typing1.00
Ripples7.0s
Travel0.32
Interactive
Pulse1.00
Parallax0.50
Intro
Paused
Quality1.00
Props
41| Name | Type | Default | Description |
|---|---|---|---|
preset | "prism" | "keyboard" | "overhead" | "frost" | "ember" | "prism" | A complete look; the props it sets follow it until you pass them. |
colors | [string, string] | ["#5227FF", "#FF7A27"] | Two colors of the light caught in the glass. |
backgroundColor | string | "#0a0a0a" | Color behind the keys. Light backgrounds switch to a frosted, ink-like look. |
size | number | 0.44 | Key width as a fraction of the frame's shorter side. |
spacing | number | 0.32 | Gap between keys as a fraction of a key. |
stagger | number | 0 | Shifts each row sideways like a keyboard, as a fraction of a key. |
height | number | 0.5 | Keycap height as a fraction of its width. |
taper | number | 0.72 | Width of the top compared with the base. |
radius | number | 0.08 | Corner radius of the keycap as a fraction of its width. |
bevel | number | 0.05 | Roundness of the top edge, as a fraction of the key width. |
dish | number | 0.04 | Depth of the hollow in the top of each key. |
legends | boolean | true | Prints a letter on each key. Pressed keys light it from below. |
tilt | number | 42 | How far the camera looks down on the keys, in degrees. 90 is straight down. |
angle | number | 28 | Rotation of the grid in degrees. |
centerX | number | 0 | Horizontal offset of the view. |
centerY | number | 0 | Vertical offset of the view. |
ior | number | 1.5 | Index of refraction of the glass. |
dispersion | number | 1.6 | How far the glass splits light into colors. |
density | number | 1 | How strongly the glass is tinted. |
frost | number | 0 | Frosted look of the glass. |
glow | number | 1 | Glow along the key edges. |
backlight | number | 1 | Brightness of the light under each key that shows when it is pressed. |
intensity | number | 1 | Overall brightness. |
lightAngle | number | 0 | Rotates the lights around the keys, in degrees. |
lightSpeed | number | 4 | How fast the lights drift around the keys, in degrees per second. 0 holds them still. |
blur | number | 0.6 | Depth of field. Keys nearer and farther than the focus soften. 0 keeps everything sharp. |
focus | number | 0.5 | Depth that stays sharp, 0 near to 1 far. |
grain | number | 0.3 | Film grain over the lit keys. |
typing | number | 1 | Speed of the idle typing, in bursts of key presses. 0 turns it off. |
ripples | number | 7 | Seconds between idle ripples across the keys. 0 turns them off. |
travel | number | 0.32 | How far a key sinks when pressed, as a fraction of its height. |
interactive | boolean | true | Keys press under the pointer, and a click sends a ripple. |
pulse | number | 1 | Strength of the click ripple. |
parallax | number | 0.5 | How much the grid leans toward the pointer. |
intro | boolean | true | Keys rise into place across the grid the first time it comes into view. |
paused | boolean | false | Freezes the typing, ripples and lights. |
quality | number | 1 | Lower values render faster on slow devices. |
ref | Ref<CrystalKeysHandle> | None | Sends a ripple from a point (0 to 1 on each axis), types a burst of keys, or replays the intro. |
children | ReactNode | None | Content layered above the keys. |
className | string | None | Classes for the root element; give it a height. |
style | CSSProperties | None | Inline styles for the root element. |