Popover
A floating panel anchored to a trigger, for light contextual content—a detail, a short form, a couple of actions. The trigger carries the ARIA attributes (aria-haspopup, aria-expanded) and opens the panel.
Overlays · TaishoDS Core, in plain HTML.
Examples
One working example per case. Each example is the HTML of its preview—copy it as is, and with Core’s CSS and JS loaded, it looks and works the same.
Account details in a popover
Your Pro plan renews on September 3.
When to use
- The content depends on the element that opens it and is best shown next to it.
- It’s light and doesn’t justify interrupting with a dialog.
- What’s underneath stays useful while the panel is open.
When not to use
- The task deserves to interrupt and block the background →
modal. - It’s a list of actions on an object →
menu. - It’s only a label that describes the trigger →
tooltip.
Do
- Anchor it to the element it explains, and choose a
placement-*for the panel (placement-bottom-start,placement-top…) that doesn’t cover anything important. - Keep the content short. If it needs its own scroll, it’s already a
modalor adrawer.
Don’t
- Don’t put a multi-step flow in a popover.
- Don’t open it on hover. A panel with controls opens on click.
TaishoDS Core
Needs Core’s JS, which hooks in through data-ts-* attributes.
It uses the Popover API to show and hide. The rest is positioning.
What it does: Anchors the panel to the trigger with CSS anchor positioning. The trigger renders with aria-expanded="false", and Core keeps it in sync on open and close. The controls (input, select, textarea) of a closed .ts.popover panel become disabled (marked data-ts-popover-off; controls you had already disabled are left alone) and are restored on open. That way they aren’t submitted with the form and don’t block its validation while the panel is closed. This part needs the Core script. Without it, the fields are submitted. A field’s value is kept when the panel reopens.
Limitation
From the CDN, without a build, load taisho.popover.css along with taisho.base.css. That file is all you need.
For how Core works in general, see Behavior.
Accessibility
- The trigger gets
aria-haspopup="dialog"andaria-expandedautomatically. Core renders it asfalseand syncs it when the panel opens and closes. - When closed, the panel is hidden (display none, out of the accessibility tree) and keeps its fields, so the chosen value is still there on reopen. Its controls stay
disableduntil it opens, so they aren’t submitted with the form and don’t block its validation. - Esc closes the panel, and so does a click outside.
- Native top layer (Popover API) with anchor positioning and automatic flipping, direction-aware. Its own
fixedfallback without support—see the system’s overlay architecture.
Keyboard
On top of what the browser already does (Tab moves focus, Enter activates a button).
| Key | What it does |
|---|---|
| Esc | Closes and returns focus to the trigger. |
Verification
What was actually tested. Anything that wasn’t tested says so—we’d rather say “not verified” than claim too much.
- axe WCAG 2.2 A + AA in a real browser, in light and dark mode, before every release.
- keyboard Key map documented above, checked against the component.
- screen reader Not verified with a screen reader. Test it in your own combination of components, not just here, where each one appears alone and on its happy path.