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 →
Gestures & Cards5 min read

Spring Modal Dialog with Confirm and Dismiss

Direct Definition & Architecture

A physics modal springs between closed and open states, scales the page behind it, and emits an event when the user confirms or dismisses. The same scene can be anchored to the bottom edge for a sheet layout.

Live .bexode820 × 520

Toggle open, then press confirm or dismiss.

Live inputs
Download .bexodeDownload .exodeEvents: confirmdismiss

Technical Specifications

Scene format
One .exode file
Live inputs
open, heading, body, accent
Emitted events
confirm, dismiss
Motion
Spring modal + dimmed page

Interaction Phases

ClosedThe trigger sits in the page with no overlay.
OpeningThe dialog springs out of the trigger; the page scales to 96% and dims.
OpenHeading, body and actions are readable over the backdrop.
ClosingConfirm, dismiss or the backdrop emits an event and springs the dialog away.

The scene keeps one Idle state. These phases are driven by its inputs and pointer events; the same values appear in the code below.

Use the scene

bottom-sheet.jsx
import { ExodeUICanvas } from 'exodeui';

// bottom-sheet.bexode goes in /public
export function BottomSheet() {
  return (
    <ExodeUICanvas
      src="/animations/react-animated-modal.bexode"
      fit="Layout"
      autoPlay
      interactive
      inputs={{
        open: false,
        heading: 'Delete project?',
        body: 'This removes the file for everyone on your team.',
        accent: '#ef4444',
        ink: '#fafafa',
        bg: '#0c0c0e',
      }}
      onTrigger={(name) => {
        // fires: 'confirm', 'dismiss'
      }}
      style={{ width: '100%', height: 520 }}
    />
  );
}

This snippet loads /animations/react-animated-modal.bexode with the same inputs shown in the live stage.

Architectural Breakdown

Static modals often snap between fixed heights and ignore interruption.

This scene springs the dialog from its trigger, scales the page behind it, and lets the open input interrupt the motion at any point.

The confirm and dismiss events are the handoff back to your app, so the scene owns the motion while your code owns the action.

Frequently Asked Questions

Explore Related Motion Guides & Tooling

Build your next living interface today.

Design fluid physics and visual logic in ExodeUI and export directly to React, Swift, and Flutter.

Try for free