Holiday sale: 40% off Pro with code · limited offer · ends Dec 31
See ProSwitches, checkboxes and radio buttons with physical motion. Press a switch and its knob turns into a refractive glass lens; drag it and it stretches with your speed, rubber bands past the ends and settles on a real spring, while checkboxes squash on press and draw their tick and radio dots swell in with overshoot. Ships light and dark glass panels, full keyboard support with roles and focus rings, controlled or uncontrolled values, and instant states under reduced motion.
Included in Pro and aboveCompare plans
Live preview. Move the mouse, scroll and click inside the frame.
The copied code, markdown and prompt include the values you set here.
import { SpringSwitchSet } from "@/components/hyperblur-pro/spring-switch-set"
<SpringSwitchSet />
<SpringSwitch label="Wireless" defaultChecked onChange={(on) => console.log(on)} />
<SpringCheckbox label="Photos" hint="2,184 items" />
<SpringRadioGroup aria-label="Quality" options={[{ value: "std", label: "Standard" }, { value: "hi", label: "High" }]} />| Prop | Type | Default | Description |
|---|---|---|---|
| image | string | "https://images.unsplash.com/photo-1579546929518-9e396f3cc809" | SpringSwitchSet: backdrop photo behind the glass panels. |
| title / subtitle | string | "Switches with give." | SpringSwitchSet: heading and paragraph. |
| accent | string | "#34c759" | On color of switches (checkbox and radio default to blue). |
| refraction | number | 1 | SpringSwitchSet: strength of the panel glass lens. |
| panels | ("light" | "dark")[] | ["light", "dark"] | SpringSwitchSet: which appearance panels to show. |
| checked / defaultChecked | boolean | false | SpringSwitch, SpringCheckbox: controlled or uncontrolled state. |
| onChange | (value) => void | undefined | All controls: called with the new boolean, or the option value for SpringRadioGroup. |
| appearance | "light" | "dark" | "auto" | "light" | All controls: track and box colors for light or dark surfaces. |
| size | number | 1 | SpringSwitch: scale factor of the 64 x 30 px switch. |
| options / value / defaultValue | { value: string; label: string; hint?: string }[] / string | required | SpringRadioGroup: choices and selection. Arrow keys move the selection. |
Source code is included in Pro and above