Skip to content

Popover

Stable

A small panel that opens beside a button, for menus, pickers and short explanations.

Also known as popup, flyout, dropdown panel

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

Basic panel

Give the button its screen reader details and open the panel on click.

When to use it

A small panel that opens beside a button, for menus, pickers and short explanations. Focus moves in when it opens and back when it closes, so keyboard users keep their place.

Made of: Button · Panel

Use it for

  • A menu of actions behind a button.
  • A list of options to pick from, such as a style or a size.
  • A short explanation or a few settings that open from a button.

Not for

  • Something people must answer before going on. Use a dialog.
  • Actions on text the person has selected: use SelectionToolbar.

Do and avoid

Do. A small panel with extra detail that people can close any time.
Avoid. A big choice in a panel that closes on any click gets lost.

Do

  • Give the button its screen reader details, so it says whether the panel is open.
  • Give the panel a name that says what it holds.
  • Use a menu for a list of actions and a list box for a list of options, so arrow keys work.
  • Keep panels narrower than the screen. A panel wider than the screen still runs off the right edge.
  • Open upward near the bottom of a screen. Automatic flipping covers cases you did not plan for.

Avoid

  • Do not use it for something people must answer. Use a dialog.
  • Do not put one popover inside another.
  • Do not use an icon-only button without a name.
  • Do not rely on pointing to open it.
  • Do not use a menu or list box for content that is not a list of items. Use the default panel.

On a phone

  • Menus open as a bottom sheet with a backdrop on a narrow touch screen, kept within thumb reach and padded for the bottom safe area.
  • Other roles, such as a dialog or listbox, stay anchored to the trigger unless you set phoneSheet; they are at least 224px wide and move to stay inside the screen edges.
  • It closes when a finger touches outside it, and the sheet scrolls inside itself at up to 80% of the screen height.
  • Give an anchored panel inside a scrolling or clipped parent the portal prop so it is not cut off.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started