Spring Modal Dialog with Confirm and Dismiss
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.
Toggle open, then press confirm or dismiss.
Technical Specifications
Interaction Phases
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
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.