Motion Switch
A settings switch whose knob stretches as it slides, with a small burst when it turns on.
- 4.4 KB .bexode
- 7 live inputs
- Responsive fit Layout
Use it
The code follows your customizations. Install with npm i exodeui.
import { ExodeUICanvas } from 'exodeui';
// motion-switch.bexode goes in /public (download it below)
export function MotionSwitch() {
return (
<ExodeUICanvas
src="/motion-switch.bexode"
fit="Layout" // responsive: redraws at any container size
autoPlay
interactive
onTrigger={(name) => {
// fires: 'change', 'enabled', 'disabled'
}}
style={{ width: '100%', height: 360 }}
/>
);
}Inputs
| Input | Type | Default | Range |
|---|---|---|---|
checked | Boolean | true | — |
label | Text | Sync | — |
sublabel | Text | Keep your files up to date on every device | — |
speed | Number | 1 | 0.1 – 4 |
accent | Text | #10b981 | hex colour |
offColor | Text | #272732 | hex colour |
bg | Text | #090a10 | hex colour |
Events (via onTrigger): changeenableddisabled