Skip to main content
← All 20 Diwali UI components

Diya Toggle Switch: a Diwali UI component

A settings switch whose knob is a diya that lights when it turns on. A free, live toggle component.

Updated November 2026

When to use the Diya Toggle Switch

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.

Add the Diya Toggle Switch to React or Next.js

  1. Pick a component. Open it in ExodeUI to change its text and colours, or keep it as it is.
  2. Download the .bexode file and put it in your public folder.
  3. Install the runtime with npm i exodeui.
  4. Render it with 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>
    </>
  );
}

Frequently asked questions

Is the Diya Toggle Switch free to use?
Yes. Try it here, open it in ExodeUI on the free Community plan or download the .exode file.
What does the Diya Toggle Switch do?
A settings switch whose knob is a diya that lights when it turns on. Flip a switch to see it.
Can I restyle the Diya Toggle Switch for my brand?
Yes. Open it in ExodeUI and every colour, label, shape and timing can be edited. Any names and prices in it are sample content.
Can my code control it?
Yes. Fire its triggers (in_toggle_1, in_toggle_2) with fireTrigger from useExodeUI. Your own code still handles what the action does, such as saving the choice.