Components / Utils

Modal

Modal is the low-level primitive that renders content in a layer above the page and blocks interaction with everything behind it. Higher-level components like Dialog and Drawer build on it.

Figma

The Figma reference for Modal will appear here once the design link is added.

Figma component

Storybook

Interactive examples for Modal will render here once the Storybook link is wired in.

Storybook component story

Best practices

  • Reach for a higher-level component (Dialog, Drawer) when it fits; use Modal directly only for custom overlays.
  • Block the underlying page while the modal is open and provide a clear way to close it.
  • Keep modal content focused on a single task or decision.

Do’s and don’ts

Do

Use a modal for a focused, interrupting task that needs the page blocked.

Don’t

Stack multiple modals on top of one another.

Accessibility

  • Move focus into the modal on open, trap it while open, and restore focus to the trigger on close.
  • Support closing with the Escape key.

Related components