弹出框
用途
A3S UI 弹出窗口相对于 .popover 包装器是内联定位的。这与 shadcn/ui 的门户 Base UI 实现不同,但保持标记无依赖,并与 A3S UI 现有的下拉/选择定位模型配合使用。
Add your popover HTML
HTML 结构
<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". Open popovers use a 4-pixel side offset and 8-pixel viewport collision padding by default. Override them withdata-side-offsetanddata-collision-padding, or setdata-collision="none"to keep static CSS positioning. While positioned, the runtime publishes--available-height,data-resolved-side,data-resolved-align, anddata-a3s-positioned="true".
示例
基本
对齐
侧面
带表格
RTL
弹出窗口对齐使用逻辑开始和结束偏移。在父级上设置 dir="rtl" 以翻转开始/结束对齐。