Component packs › Orbitals › Valence Toggle

Valence Toggle

Switch on and the electron jumps to the outer shell; switch off and it falls back, giving off a photon that wiggles away.

Valence Toggle is a switch from Orbitals, a component pack with 6 components: Components that behave like atoms. Price: $2 for the whole pack.

Built with: quantum jump, photon wave, role switch.

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.

Valence Toggle props

PropTypeDefaultDescription
labelstring
hintstring
onboolean
onChange(on: boolean) => void
autoplaybooleanShowcase: flips by itself until touched.

Methods on the ref

Use it in React

import ValenceToggle from './ValenceToggle';

<ValenceToggle />

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

More in Orbitals

Good for: Loaders and progress.