HTML + CSSToggles

Elastic iOS toggle

An iPhone-style switch whose knob stretches while you hold it down, then springs into place.

Settings

16px
1x

Code

<label class="uv-ti"><input type="checkbox" checked><span></span></label>

Prompt for AI

Paste it into ChatGPT, Claude or Cursor and it will adapt the block to your project with these settings, even if you don’t use React.

More in Toggles

Where to use it

This iOS toggle switch is the one people expect in a settings screen: “Push notifications”, “Dark mode” or “Share usage data” in the preferences of a web app. It copies a detail from the iPhone that many CSS switches skip: while you keep it pressed, the knob stretches like a drop, and on release it springs to the other side.

The stretch only shows while holding, so it is felt more than noticed, and that's the point. Green gives you the native iPhone look; your brand color makes it feel like part of your own product.