Skip to main content
← All 20 Diwali UI components

Diwali Primary Button: a Diwali UI component

A checkout button with shimmer, a loading spinner and a burst of sparks on success. A free, live button component.

Updated November 2026

When to use the Diwali Primary Button

Use it for the one main action on a screen, such as placing an order. The spinner shows the tap worked, and the sparks mark success. Keep the sparks for moments that matter, because they lose their effect if every button has them.

Add the Diwali Primary Button 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 DiwaliPrimaryButton() {
  const { setEngine, fireTrigger } = useExodeUI();

  return (
    <>
      <div style={{ width: 400, height: 300 }}>
        <ExodeUICanvas
          src="/ui-gallery/files/diwali-button.bexode"
          autoPlay
          onReady={setEngine}
          style={{ width: '100%', height: '100%' }}
        />
      </div>
      {/* Optional: taps on the canvas already work */}
      <button onClick={() => fireTrigger('in_order')}>Play from code</button>
    </>
  );
}

Frequently asked questions

Is the Diwali Primary Button free to use?
Yes. Try it here, open it in ExodeUI on the free Community plan or download the .exode file.
What does the Diwali Primary Button do?
A checkout button with shimmer, a loading spinner and a burst of sparks on success. Tap Place order to see it.
Can I restyle the Diwali Primary Button 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_order, in_secondary) with fireTrigger from useExodeUI. Your own code still handles what the action does, such as saving the choice.