Component packs › Clayworks › Puff Toggle

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.

Puff Toggle props

PropTypeDefaultDescription
labelstring
checkedboolean
autoplaybooleanShowcase mode: flips itself every few seconds.
onChange(checked: boolean) => void

Methods on the ref

Use it in React

import PuffToggle from './PuffToggle';

<PuffToggle />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Clayworks

Good for: Micro-interactions.