Popover
Usage
A3S UI popovers are inline-positioned relative to the .popover wrapper. This differs from shadcn/ui's portalled Base UI implementation, but keeps the markup dependency-free and works with A3S UI's existing dropdown/select positioning model.
Include CSS
Import Tailwind and one full A3S UI style bundle.
Or import only the base CSS, Popover component CSS, and one style pack.
Using CDN or bundler imports? See the Installation page.
Include JavaScript
Copy or serve the full A3S UI JavaScript bundle.
Or copy or serve the A3S UI runtime and Popover script.
Using CDN or bundler imports? See the Installation page.
Add your popover HTML
HTML structure
<div class="popover">Relative wrapper for the trigger and inline popover content.
<button type="button" aria-expanded="false" aria-controls="{ POPOVER_ID }">- Trigger button. The script toggles
aria-expandedand opens or closes the content. <div data-popover id="{ POPOVER_ID }" aria-hidden="true">- Popover content. Supports
data-side="top|right|bottom|left|inline-start|inline-end"anddata-align="start|center|end".
Examples
Basic
Align
Sides
With form
RTL
Popover alignment uses logical start and end offsets. Set dir="rtl" on a parent to flip start/end alignment.