For AI agents: the complete documentation index is available at https://ifhover.github.io/leaf-ui/llms.txt, the full documentation bundle is available at https://ifhover.github.io/leaf-ui/llms-full.txt, and this page is available as Markdown at https://ifhover.github.io/leaf-ui/api/popup-options.md.

PopupOptions

Select、日期与时间选择器等组件共用的浮层参数。单个组件的配置优先于 ConfigProvider 的 getPopupContainer;Modal、Drawer 的挂载容器参数名为 container。

PopupOptions

属性类型说明
popupPlacement'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end'浮层相对触发控件的位置。
popupClassNamestring浮层的自定义类名。
popupStyleCSSProperties浮层的自定义样式。
popupRender(content: React.ReactNode) => React.ReactNode包装或补充面板内容,保留传入的内容以维持交互。
getPopupContainer() => Element | DocumentFragment返回浮层的挂载容器,也可返回 ShadowRoot。

容器应在交互前挂载,并避免裁剪浮层。通过函数延迟访问 DOM;使用 ShadowRoot 时,也需在对应的影子根内加载组件样式。各组件的默认位置和附加选项见对应组件文档。