Modal

Last updated

What is Modal?

Modals are containers appearing in front of the main content to provide critical information or an actionable piece of content.

  • Supports any type of Content: Like any other container, modals can be used in different scenarios and you should be able to use it with any other component inside.
  • Supplementary Actions: Since content in the modal may be actionable, it’s important to have an area for action elements. This area is usually located at the bottom of the modal container.
  • Close Action: Modals should provide a clear way to be closed as they’re blocking content when open. This may be either a separate close button or one of the supplementary actions.
  • Information Structure: Even though modals can be used as an empty container for the content, they need a defined information structure to provide a holistic experience. It may include defining how titles and subtitles look by default or where an action element’s area is.
  • Keyboard Navigation Support: It should be possible to close a modal by pressing the Esc key and all the focusable elements inside the modal container should be accessible with keyboard navigation.
  • Focus Trapping: Once a modal is opened, the focus should be moved to the first element inside the modal and should be looped within the modal container. Closing the modal should return the focus to the last focused element on the page.

More in stage 9: Project Management

Modal: common questions

Can I learn Modal in Hindi?

This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Modal in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.

Is this Modal tutorial for beginners?

It is lesson 97 of 124 in the free Design System roadmap, in stage 9, Project Management. If you are new to Design System, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.

Still confused? Ask me