Toggle
A switch with a knob that stretches as it crosses the track and settles with a small overshoot.
- 1.4 KB .bexode
- 4 live inputs
- Responsive fit Layout
Use it
The code follows your customizations. Install with npm i exodeui.
import { ExodeUICanvas } from 'exodeui';
// toggle.bexode goes in /public (download it below)
export function Toggle() {
return (
<ExodeUICanvas
src="/toggle.bexode"
fit="Contain"
autoPlay
interactive
onTrigger={(name) => {
// fires: 'checked'
}}
style={{ width: '100%', height: 560 }}
/>
);
}Inputs
| Input | Type | Default | Range |
|---|---|---|---|
accent | Text | #FF5A1F | hex colour |
surface | Text | #FFFFFF | hex colour |
ink | Text | #17171C | hex colour |
checked | Boolean | false | — |
Events (via onTrigger): checked