Modal flow

Trigger, dialog, confirmation, and the state it resolves to.

0:00 / 0:01

Customize

18
66

Installation

pnpm odori add component modal-flow

Edit the source in videos/components/modal-flow/. Use odori diff to compare upstream changes and odori update to apply updates.

Timing contract

Use these durations and content limits when composing a scene. Run odori test to check your video.

Family
Interface
Recommended duration
120 frames · 4s
Minimum duration
60 frames · 2s
Entrance
12 frames
Exit
10 frames
Reduced motion
the dialog cuts between states without scaling
Requires
sans font
Content limits
title ≤ 64, body ≤ 160, confirm ≤ 24, cancel ≤ 24, resolved ≤ 40

Props

PropTypeDefaultRequired
childrenWhat sits behind the dialog.ReactNode——
titlestring"Deploy to production?"—
bodystring"This will promote the current preview build. It can be rolled back."—
confirmThe primary button's label.string"Deploy"—
cancelstring"Cancel"—
resolvedWhat the surface says once the dialog has resolved.string"Deployed"—
openAtFrame the dialog opens on.number18—
confirmAtFrame the confirm button is pressed.number66—

Related components

All components