Popover 弹出框
弹出框可用于在元素边缘显示某些内容。
使用 Popover
组件时需要了解的事项:
- The component is built on top of the
Modal
component. - The scroll and click away are blocked unlike with the
Popper
component.
简单的弹出窗口
锚点播放场
使用单选按钮调整 anchorOrigin
和 transformOrigin
位置。 您还可以将 anchorReference
设置为 anchorPosition
或 anchorEl
。 当它是 anchorPosition
,该组件将代替 anchorEl
, 指的是 anchorPosition
道具,其可以调整设置 的酥料饼的位置。
<Popover
anchorOrigin={{
vertical: 'top',
horizontal: 'left',
}}
transformOrigin={{
vertical: 'top',
horizontal: 'left',
}}
>
The content of the Popover.
</Popover>
鼠标悬停在互动上
This demonstrates how to use the Popover
component to implement a popover behavior based on the mouse over event.
Hover with a Popover.