Lever SolidJS toggle switch
Mechanical
A lever that throws up and down through an arc. Our first pick: a mechanical toggle with 5 inputs your Solid code can drive, in a 614-byte file.
Solid · Toggles · Updated November 2026
Need a SolidJS toggle switch component with real motion? These five animated toggle switches play in Solid from one .exode file, chosen from the 100 in Exode Galleries. Each one is live below: try it, then open it in ExodeUI and drop it into your Solid app with the code at the end.
Mechanical
A lever that throws up and down through an arc. Our first pick: a mechanical toggle with 5 inputs your Solid code can drive, in a 614-byte file.
Light & Glow
A neon outline that flickers into life. It is a light & glow toggle with 5 inputs your Solid code can drive, in a 622-byte file.
Transition Effects
Liquid sloshes in and settles with a wave. It is a transition effects toggle with 5 inputs your Solid code can drive, in a 625-byte file.
Scenery
Dusk falls and fireflies drift up from the grass. It is a scenery toggle with 5 inputs your Solid code can drive, in a 617-byte file.
Classic Switches
The familiar pill switch: knob slides, track fills with colour, knob widens while pressed. It is a classic switches toggle with 5 inputs your Solid code can drive, in a 628-byte file.
Use it as a checklist when you compare the picks above. Each one is a native toggle in ExodeUI, so whatever is missing you change in the editor instead of rewriting Solid code.
| # | Design | Category | Inputs | File |
|---|---|---|---|---|
| 1 | Lever | Mechanical | 5 | 614 B |
| 2 | Neon Tube | Light & Glow | 5 | 622 B |
| 3 | Liquid Fill | Transition Effects | 5 | 625 B |
| 4 | Fireflies | Scenery | 5 | 617 B |
| 5 | Classic Switch | Classic Switches | 5 | 628 B |
The code for #1, Lever, with its real file and input names. Every pick works the same way.
npm install exodeui-solidimport { ExodeUICanvas } from 'exodeui-solid';
import artboard from './lever.exode?raw';
export default function Lever() {
let engine;
return (
<>
<ExodeUICanvas
artboard={JSON.parse(artboard)}
fit="Contain"
onReady={(e) => { engine = e; e.setInputBool("Lever · On", true); }}
/>
</>
);
}Pick a design here, open it in ExodeUI and change it, then export a .bexode file. Install exodeui-solid (npm install exodeui-solid) and load the file with the runtime; the code below uses the first pick’s real file and input names. The motion, states and springs live in the file, so your Solid code only sets and reads inputs.
It depends on the job: Lever (mechanical), Neon Tube (light & glow), Liquid Fill (transition effects) cover different styles. These five are our picks from the 100 toggles in Exode Galleries, chosen for range, for how much is wired to inputs and for how well they read small. They are not a survey of other libraries.
They replace it where you want custom motion. Keep the built-in one where the platform default is right, and use an ExodeUI file where the toggle switch is part of your brand.
Yes. They come from Toggle Studio, built into the ExodeUI editor and included in the free Community plan. The Solid runtime is free too.
Yes. Open one in ExodeUI and every part is a native layer: colours, type, motion and logic. The input names stay the same, so your code keeps working.
Free to start. Every studio behind this library is built into the editor, and everything it makes stays native and editable.
Try ExodeUI for free