Modal Component

Modals are pop-up dialogs which interrupts the user’s main flow and the user needs to take certain action before they can continue.

Modal Variations

Info Displays only the contextual information related to the referred item.
Form Provide actionable buttons for the user to act upon.
Confirmation Provide actionable buttons for the user to act upon.
Error Provide actionable buttons for the user to act upon.

Guideline

• Only appears when the cursor is hovering over the selected item.
• Should contain a brief read-only text label.
• On default, tooltips are placed on top of the selected item. But when there isn’t enough space in the viewport, it should be placed to the side or below as needed.

When to Use

• To clarify or give more contextual information about the item being displayed.
• To show information in a form of short and brief sentences.
• Provide context for unlabeled icon buttons.

When not to Use

• Not to display the same thing as the hovered item. For example, providing tooltip labelled “confirm” for an action button labelled “confirm”
• Long complex format information.
• Having action button or link.

Code