Popover
Anchored floating panel. The trigger goes in the default slot and the panel content in slot="content". Click mode closes on outside-click and Esc; hover mode opens after a short delay.
Preview
<esa-popover position="bottom">
<button>Open popover</button>
<div slot="content">Popover below the trigger.</div>
</esa-popover> Positions
<esa-popover position="top">…</esa-popover>
<esa-popover position="bottom">…</esa-popover>
<esa-popover position="left">…</esa-popover>
<esa-popover position="right">…</esa-popover> Appearance
Two appearances, aligned to Beacon's PopoverAppearance. default is a light surface panel; inverse is a dark panel with light text — use it to signal documentation or help content rather than form data.
<esa-popover appearance="default">…</esa-popover>
<esa-popover appearance="inverse">…</esa-popover> Trigger & arrow
Switch to trigger="hover" for a hover-revealed panel, or hide the pointer with has-arrow={false}.
<esa-popover position="bottom" trigger="hover">…</esa-popover>
<esa-popover position="bottom" has-arrow={false}>…</esa-popover> API
| Prop | Type | Default | Description |
|---|---|---|---|
position | 'top' | 'bottom' | 'left' | 'right' | 'bottom' | Side the panel opens on, relative to the trigger. |
trigger | 'click' | 'hover' | 'click' | Click toggles and closes on outside-click + Esc; hover opens after a 200ms delay. |
has-arrow | boolean | true | Renders the pointer arrow toward the trigger. |
offset | number | 8 | Gap in pixels between trigger and panel. |
appearance | 'default' | 'inverse' | 'default' | Panel style (aligned to Beacon): default is a light surface; inverse is a dark panel with light text, for documentation/help content. Reflected as an attribute. |
open | boolean | false | Reflected open state. |
Accessibility
- The floating panel is
role="dialog". - Click mode closes on
Escapeand on any click outside the component. - Keyboard and focus behavior come from whatever element you slot as the trigger — use a real
<button>.
Theming surface
Every public token this component reads, extracted from its source at build time.
The Resolves to column walks each token's real lineage —
component → semantic → primitive → raw value — so you
can see exactly where re-pointing it lands. A spoke re-skins by overriding these in
its theme-<slug>.css; component internals are never edited. No
hook for what you need? File it with /request-lego.
| Token | Tier | Resolves to |
|---|---|---|
--popover-bg | component | #fcfcfc via --color-surface → --color-gray-1 |
--popover-border-color | component | #cecece via --color-border → --color-gray-7 |
--popover-color | component | #202020 via --color-text-primary → --color-gray-12 |
--popover-max-width | component | none |
--popover-radius | component | 0.5rem via --radius-200 |
--color-text-inverse | semantic | #fcfcfc via --color-gray-1 |
--font-sans | semantic | 'DM Sans', sans-serif |
--color-gray-12 | primitive | #202020 |
--shadow-300 | primitive | 0 6px 24px -6px rgba(0, 0, 0, 0.07) |
--spacing-300 | primitive | 0.75rem |
--z-dropdown | primitive | 50 |