Buttons
Three layer push button
Three layer push button: A tactile key built from three stacked plates, a cast shadow, a dark side wall and a floating face, that springs up on hover and bottoms out instantly on press.
Using Three layer push button
Three layer push button uses the inline preview frame with a light/dark theme setting.
Customize the preview
These controls are passed to the demo. Defaults and limits describe the preview; consult the implementation for its full prop API.
| Control | Type | Default | Preview limits |
|---|---|---|---|
label | text | Click me | Up to 24 characters |
accent | color | #FF4D8D | No additional limit in the metadata. |
liftHeight | number | 4 | From 2 to 12; step 1 |
radius | number | 12 | From 4 to 26; step 1 |
springy | boolean | true | No additional limit in the metadata. |
Which frameworks are available for Three layer push button?
Three layer push button is available for React, Vue, Svelte, Astro, HTML. The live preview uses React; the source observations below apply to index.tsx. Check the selected port before relying on the same interactions.
What does Three layer push button depend on?
The React metadata lists these npm dependencies beyond React: motion, clsx.
What accessibility details are visible in Three layer push button?
The React source for Three layer push button includes: attributes and handlers (aria-hidden, onKeyDown, onKeyUp); key comparisons (Enter, Space). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.
How does Three layer push button handle reduced motion?
Three layer push button reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: duration: pressed || reduce ? 0.05 : 0.2; faceY: reduce ? resting : pressed ? -1 : hovered ? resting - 2 : resting; settle: pressed || reduce ? { duration: 0.045, ease: "linear" } : { type: "spring", stiffness: 250, damping: 22 }. Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.