Popover
A popover opens beside its trigger with a few details or controls for one item, such as the interview on a candidate's row. The page stays usable, and a click outside closes it without losing what was typed.
When to use it
Use a popover for a small task on one item: rescheduling an interview, logging a call with a candidate, seeing who has read an update. It closes as soon as the task is done or people click elsewhere.
A name or a shortcut belongs in a tooltip, a list of commands in a menu. When people have to answer before going on, open a dialog.
Sunita RaiCare assistant
Anatomy
A popover sizes itself to its content. It is at least as wide as its trigger, stops growing at 404 px, and scrolls when it runs out of height.
- Width
- from the trigger's width to 404 px
- Padding
- 12 px
- --space-3
- Corner radius
- 12 px
- --radius-xl
- Title
- 14 px on a 20 px line, weight 500
- --type-nav
- Body text
- 14 px on a 22 px line
- --type-small
- Buttons inside
- 36 px, 44 px on touch screens
- Gap to the trigger
- 8 px
- --space-2
- Distance from the window edge
- at least 8 px
- --space-2
- Maximum height
- 70 percent of the window, or the room on its side
- Surface with a mouse
- raised fill and shadow, with a fine top highlight and rim in the dark theme
- --glass-fill-raised, --glass-highlight, --glass-ring-raised, --elevation-3
- Surface on a touch screen
- opaque
- --surface-1
Placement
A popover opens below its trigger with their start edges aligned. A trigger at the end of a row, such as the date of an interview, aligns with the popover's end edge instead. When less than 280 px remain below and there is more room above, it opens upward. Near the sides it moves inward, and it never covers its own trigger.
Opening and closing
Opening another popover or a menu closes the open one. Below 640 px on a touch screen, a popover that holds a form opens as a bottom sheet.
- Click, Enter or Space on the trigger
- opens it, with focus on its first control
- Tab past the last control
- closes it and moves on to the control after the trigger
- Escape
- closes it, with focus back on the trigger
- A click outside
- closes it and keeps what was typed
- The trigger scrolls out of view
- closes it
Permitted and not permitted
Permitted
Reschedule and Copy link for one interview
A small task on the item the popover belongs to.
Not permitted
A warning people must see
A click elsewhere hides it. Use a dialog or a message on the page.
An arrow pointing at the trigger
The gap and the aligned edge already show where it came from.
Accessibility
A popover is a dialog that does not block the page: role dialog without aria-modal, labeled by its title or by a name that says what it is about, such as Interview with Sunita Rai. The trigger carries aria-haspopup, aria-expanded and aria-controls.
Keep what the task depends on out of a popover. A screen reader user can leave it at any moment, and it closes when they do.