Showing motion model for Modal or drawer in standard mode. Demonstration state idle.
- Motion purpose
- Hierarchy and orientation—surface the overlay and dim the rest.
- Entering state
- Overlay enters; backdrop appears; focus moves into the dialog.
- Active state
- Dialog owns keyboard focus; background is inert but still present.
- Exiting state
- Overlay exits; focus returns to the trigger; content stays in the tree until exit completes.
- Preferred property
- Opacity + transform (translate/scale) on the overlay; opacity on backdrop.
- Timing guidance
- Prefer short springs or 150–250ms tweens for overlays. Longer motion delays task completion.
- Interruption
- Escape or outside-dismiss should cancel mid-transition and restore a usable rest state.
- Focus behavior
- Trap focus while open; restore to the opener on close; never leave focus on an unmounted node.
- Reduced-motion alternative
- Instant or opacity-only appearance; skip large travel; keep focus management identical.
- Common misuse
- Long entrance that blocks Escape, or content that only appears after animation ends.
- Performance consideration
- Animate transform/opacity; avoid animating layout width of large trees under the drawer.