
A settings switch whose knob is a diya that lights when it turns on. A free, live toggle component.
Updated November 2026
Use it for a setting that has a clear on and off, such as a festive theme or sale alerts. The lit flame makes the on state easy to spot, and the row text changes with it. If your settings page has many rows, keep it to one or two switches and use plain ones for the rest.
npm i exodeui.ExodeUICanvas. Taps and hovers work out of the box, and fireTrigger plays it from your code.import { ExodeUICanvas, useExodeUI } from 'exodeui';
export function DiyaToggleSwitch() {
const { setEngine, fireTrigger } = useExodeUI();
return (
<>
<div style={{ width: 400, height: 300 }}>
<ExodeUICanvas
src="/ui-gallery/files/diya-toggle.bexode"
autoPlay
onReady={setEngine}
style={{ width: '100%', height: '100%' }}
/>
</div>
{/* Optional: taps on the canvas already work */}
<button onClick={() => fireTrigger('in_toggle_1')}>Play from code</button>
</>
);
}