Skip to main content

Modal

A modal is a surface that overlays the page’s main content and is used to display information, gather input or confirm actions.

Example

Illustrates the movement taking place when a modal enters and exit from view. You can see an animated example of this component here.

A modal component skeleton displayed in the center the page.

Enter transition

When a modal loads into view, it uses $enter-fade-slide. It moves down 40px on the Y axis from it’s starting point, regardless of if the modal is pinned at the top or centre. The opacity starts at 0% and increases to 100%.

A chart showing the modal component's enter transition with an Y Translate animation.
PropertyCubic BezierEasing tokenNotes
Translate Y(.45, 0, .55, 1)$easing-functionalMoves down 40px
Opacity(.45, 0, .55, 1)$easing-functionalModal gently fades in
Overlay(.45, 0, .55, 1)$easing-functionalOverlay / skrim gently fades in

Exit transition

When a modal is dismissed, it uses $exit-fade-slide. It moves up 40px on the Y axis from it’s starting point, regardless of if the modal is pinned at the top or centre. The opacity starts at 100% and decreases to 0%. The exit transition is always faster.

A chart showing the modal component's exit transition with an Y Translate animation
PropertyCubic BezierEasing tokenNotes
Translate Y(.45, 0, .55, 1)$easing-functionalMoves up 40px
Opacity(.45, 0, .55, 1)$easing-functionalModal gently fades out
Overlay(.45, 0, .55, 1)$easing-functionalOverlay / skrim gently fades out
Back to top