Glass switch Pro
A clear glass track and a thick lens for a knob, carrying an icon. Hold it and the knob swells; drag it and it stretches the way it’s going, gives a little past the ends, and settles.
Character
Playful
Add it to your app
$
npx velvo add glass-switchFor Claude Code, Cursor or any project with a terminal.
Use it for
- Settings that deserve a moment: location, night mode, focus.
- Over a lock screen or a media backdrop.
Not for
- Long lists of settings: use the plain Toggle there.
More in Liquid glass
Props
Read from the component’s own TypeScript, so it’s always current.
PropTypeDefault
onbooleandefaultOnbooleanfalseonChange(on: boolean) => voidiconGlyphName'location'sizenumber1labelstring'Switch'Specs
- Category
- Glass
- Tier
- Pro
- Built with
- React and TypeScript
- Files
- 28
- Size
- 514 KB
- Needs
- framer-motion
- Install
- npx velvo add glass-switch
- Works with
- Next.js, Vite, Remix, Expo web
Licence
Velvo Pro licence- Personal and commercial use
- Change it however you like
- No credit needed
Not for resale as a component or a UI kit.