Atelier UI

搜索组件…

搜索组件…

Popover

气泡卡片:点击触发,支持上下方向与对齐,点击外部或按 Esc 关闭并还焦点。

在沙盒中编辑

复制一段给 AI 编程工具的提示词,包含源码、依赖和用法

属性

PopoverProps

同时支持以下类型的全部属性: Omit<React.ComponentProps<"div">, "children">

属性类型默认值说明
trigger* 必填React.ReactNode——
children* 必填React.ReactNode—Panel content
side"top" | "bottom""bottom"—
align"start" | "center" | "end""center"—
widthnumber288Panel width in px
panelLabelstring—Accessible name of the panel
triggerClassNamestring——
openboolean——
defaultOpenbooleanfalse—
onOpenChange(open: boolean) => void——

安装

$ npx shadcn@latest add https://chromotion.dev/r/popover.json

同类组件