Component packs › Clayworks › Puff Toggle
The puffy knob stretches into a pill as it slides, squashes against the end and jiggles to rest.
Puff Toggle is a toggle from Clayworks, a component pack with 8 components: Soft clay controls that squash, dent and wobble. Price: $2 for the whole pack.
Built with: stretch on travel, end squash, switch role.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | ||
checked | boolean | ||
autoplay | boolean | Showcase mode: flips itself every few seconds. | |
onChange | (checked: boolean) => void |
set(checked: boolean): voiddestroy(): voidimport PuffToggle from './PuffToggle';
<PuffToggle />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Micro-interactions.