Skip to main content
ExodeUI

EXODEUI DESKTOP

A little space for good ideas.

Choose your platform to get the official ExodeUI installer.

Looking for Intel Mac or other builds? Explore the web studio or check all download options.

Prefer the browser? Try for free in your browser →
All Packages
React

React interactive animation with the ExodeUI SDK

For React interactive animation that a designer builds and your code controls, install the exodeui package and render a .exode file with the ExodeUICanvas component. The useExodeUI hook sets state machine inputs and fires triggers from your React state, so a button press or API result changes what the animation does. If you only need simple enter, exit and layout transitions written in code, a code library such as Motion (Framer Motion) is the simpler choice.

React SDK · Updated November 2026

exodeui
Installation
bash
npm install exodeui

Getting Started

The React SDK provides full integration with React, including hooks, state management, and physics engine access.

Exode Vite plugin for .exode imports
State variables & logic via useExodeUI hook
ExodeSEO component for page metadata

Vite Setup

If using Vite, configure the Exode Vite plugin to load .exode files:

ts
// vite.config.ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { exodePlugin } from 'exodeui/vite-plugin'

export default defineConfig({
  plugins: [react(), exodePlugin()],
})

Basic Usage

tsx
import { ExodeUICanvas } from 'exodeui';

function App() {
  return (
    <div style={{ width: 800, height: 600 }}>
      <ExodeUICanvas 
        src="/https/www.exodeui.com/animations/my-scene.json"
        autoPlay={true}
        fit="Contain"
        alignment="Center"
      />
    </div>
  );
}

State Variables & Controls

Drive state variables from React using the useExodeUI hook:

tsx
import { useExodeUI, ExodeUICanvas } from 'exodeui';

function Controls() {
  const { setEngine, setInputBool, fireTrigger, getInputValue } = useExodeUI();

  return (
    <>
      <ExodeUICanvas src="/https/www.exodeui.com/player_controller.json" onReady={setEngine} />
      <button onClick={() => setInputBool('IsRunning', true)}>Run</button>
      <button onClick={() => fireTrigger('Jump')}>Jump</button>
      <button onClick={() => console.log(getInputValue('MyRandomNumber'))}>
        Log Value
      </button>
    </>
  );
}

Data Visualization & Graphs (v7.0.0)

Render Catmull-Rom line graphs, bar charts, and pie charts with real-time updates directly from your React state:

tsx
import { useExodeUI, ExodeUICanvas } from 'exodeui';

function RealtimeDashboard() {
  const { setEngine, updateGraphData, updateBarChartData, updatePieChartData } = useExodeUI();

  const handleUpdate = () => {
    // 1. Update LineGraph data points
    updateGraphData('SalesGraph', [12, 45, 28, 80, 65, 95]);

    // 2. Update BarChart series and categories
    updateBarChartData('RevenueBarChart', [[100, 200, 300]], ['Q1', 'Q2', 'Q3']);

    // 3. Update PieChart slice values
    updatePieChartData('MarketSharePie', [45, 30, 25]);
  };

  return (
    <div>
      <ExodeUICanvas src="/https/www.exodeui.com/dashboard.json" onReady={setEngine} />
      <button onClick={handleUpdate}>Stream Live Data</button>
    </div>
  );
}

useExodeUI Hook API

MethodSignatureDescription
setEngine(engine: ExodeUIEngine) => voidConnects the hook to ExodeUICanvas onReady
setInputBool(name: string, value: boolean) => voidSets a boolean state machine input
setInputNumber(name: string, value: number) => voidSets a numeric input value
setInputText(name: string, value: string) => voidSets a text/string input value
setInputNumberArray(name: string, value: number[]) => voidPasses an array of numbers to data-bound components
updateGraphData(nameOrId: string, data: number[] | number[][], categories?: string[]) => voidPolymorphic real-time data updater for LineGraph, BarChart, or PieChart
updateBarChartData(nameOrId: string, datasets: number[][], categories?: string[]) => voidUpdates multi-series datasets and category labels on bar charts
updatePieChartData(nameOrId: string, slices: (number | object)[]) => voidUpdates slices and proportions on pie charts
setDropdownOptions(nameOrId: string, options: string[]) => voidDynamically populates dropdown / select options
fireTrigger(name: string) => voidFires a momentary trigger input or entry transition
getInputValue(nameOrId: string) => anyReads the runtime value of any state variable or engine-evaluated property

SEO & Metadata

The ExodeSEO component manages meta tags and accessible HTML overlay:

tsx
import { ExodeUICanvas, ExodeSEO } from 'exodeui';

function MyPage({ artboard }) {
  return (
    <>
      <ExodeSEO artboard={artboard} />
      <ExodeUICanvas artboard={artboard} />
    </>
  );
}

ExodeUICanvas Props

PropTypeDefaultDescription
srcstring—URL to the animation JSON file
artboardobject—Direct JSON data object
fit'Contain' | 'Cover' | 'Fill''Contain'Scaling strategy
alignment'Center' | 'TopLeft' ...'Center'Canvas alignment
autoPlaybooleantrueAuto-start the animation loop
onReady(engine) => void—Callback when engine is initialized
onTrigger(name, anim) => void—Listener for state machine triggers
onInputUpdate(name, value) => void—Listener for input updates

React interactive animation: common questions

What is the npm package name?

exodeui. Install it with npm install exodeui. It exports ExodeUICanvas, the useExodeUI hook and a Vite plugin for importing .exode files.

How do I change the animation from React state?

Pass setEngine from useExodeUI to the onReady prop of ExodeUICanvas. Then call setInputBool, setInputNumber or setInputText with the input name from your file, and the state machine reacts on the next frame.

Is this a replacement for Framer Motion?

Not for everything. Motion is a good fit for animating your own DOM elements in code. ExodeUI fits when the animation is designed visually, has several states and should run the same way in other frameworks too.

Does it render to the DOM?

No. ExodeUICanvas draws on a canvas element. Keep text that must be selectable or read by search engines in normal HTML next to it.

Can an AI coding tool build the animation for me?

Yes. ExodeUI has an MCP server, so Claude Code, Cursor and other AI coding tools can create and edit .exode files from plain-language prompts. You then load the file with this runtime like any other.

What does ExodeUI cost?

The editor, CLI and MCP server need ExodeUI Professional: $6.30 a month billed yearly, or $8 month to month. New accounts get a trial. The runtime package installs from the public registry.

Related