skip the tree
system / motion / dialog4 rebuilds

Dialog

The Dialog examples of the Motion library, rebuilt in Composite: the same trigger, in steps, with the system's own parts.

the category

motion/_rebuilds
rebuilds
4
from motion+
3
easing
steps() only

motion / dialog / family-style dialog

after a motion+ example
invite, then send
margin_rebuilds/​dialog/​family-dialog.tsx
Motion
AnimatePresence, layoutId
here
play(), 4 frames
a frame
80 ms, a part a step
a step
the content cuts in place

The dialog opens in one cut. A next step replaces its content in place, then the title, the text and the actions step in, one a frame.

motion / dialog / modal: shared layout

after a motion+ example
open a card
margin_rebuilds/​dialog/​modal-shared-layout.tsx
Motion
layoutId, AnimatePresence
here
play(), 4 frames
a frame
80 ms, a part a step
the card
a solid fill while open

A card cuts to a dialog with its photo: nothing grows between the two. The dialog's parts step in, and the card keeps a solid fill while it is open.

motion / dialog / accordion

after a motion.dev example
open a question
margin_rebuilds/​dialog/​accordion.tsx
Motion
animate, variants
here
the State set
open
one panel at a time
a panel
opens and closes in one cut
original
Accordion

A heading opens its panel in one cut and closes the panel that was open. The height jumps; nothing grows.

motion / dialog / modal dialog

after a motion+ example
open the modal
margin_rebuilds/​dialog/​modal.tsx
Motion
AnimatePresence, whileTap
here
play(), 4 frames
a frame
80 ms, a part a step
close
a button, Escape, one cut
original
Modal dialog

The dialog opens in one cut, empty for one step, then its title, text and actions step in. It closes in one cut, and focus goes back to the button.