Skip to main content

Motion Switch

A tactile physics toggle switch with elastic fluid thumb stretching, smooth track morph, particle burst explosion on toggle, and real-time state synchronization.

  • 4.2 KB .bexode
  • 7 live inputs
  • Responsive fit Layout
Live runtime

Use it

The code follows your customizations. Install with npm i exodeui.

import { ExodeUICanvas } from 'exodeui';

// motion-switch.bexode goes in /public (download it below)
export function MotionSwitch() {
  return (
    <ExodeUICanvas
      src="/motion-switch.bexode"
      fit="Layout"   // responsive: redraws at any container size
      autoPlay
      interactive
      onTrigger={(name) => {
        // fires: 'change', 'enabled', 'disabled'
      }}
      style={{ width: '100%', height: 360 }}
    />
  );
}

Inputs

InputTypeDefaultRange
checkedBooleantrue—
labelTextRealtime Sync—
sublabelTextEnable zero-latency vector state synchronization—
speedNumber10.1 – 4
accentText#10b981hex colour
offColorText#272732hex colour
bgText#090a10hex colour

Events (via onTrigger): changeenableddisabled