Tactile Glassmorphism Spring Button with Refraction
A tactile glass button pairs a translucent canvas-drawn frosted layer with specular highlights and second-order spring scaling. On press, the specular highlight shifts while the pill compresses with natural damping.
Technical Specifications
Interaction Phases
The scene keeps one Idle state. These phases are driven by its inputs and pointer events; the same values appear in the code below.
Use the scene
import { ExodeUICanvas } from 'exodeui';
// glass-button.bexode goes in /public
export function GlassButton() {
return (
<ExodeUICanvas
src="/examples/live/glass-button.bexode"
fit="Layout"
autoPlay
interactive
inputs={{
label: 'Open workspace',
accent: '#8b5cf6',
tint: '#22d3ee',
bg: '#0a0913',
ink: '#f8f7ff',
}}
onTrigger={(name) => {
// fires: 'press'
}}
style={{ width: '100%', height: 380 }}
/>
);
}This snippet loads /examples/live/glass-button.bexode with the same inputs shown in the live stage.
Architectural Breakdown
Standard flat buttons feel lifeless on high-density displays.
This glass component features dynamic specular border gradients that refract ambient page light.
Spring physics ensure instantaneous response on pointer events without CSS transition latency.
Frequently Asked Questions
Explore Related Motion Guides & Tooling
Build your next living interface today.
Design fluid physics and visual logic in ExodeUI and export directly to React, Swift, and Flutter.