Easily create Hooks for tooltip, popover and other components
Examples
Basic usage
Control the spacing between the popper and the reference by setting offset.
By offsetting the popper position to a certain extent, it is guaranteed that it is always within the visible area. When the references all leave the viewport, the popper follows. That is to say, the popper is kept in the viewable area with priority.
When the visible space in the specified direction is insufficient, the direction with sufficient space will be automatically selected for display
The popper is automatically hidden when the reference goes beyond the visible area.
You can also target virtual elements, such as the right mouse button.
Use useAutoUpdatePopper to automatically monitor events such as scrolling or other strategies to ensure accurate positioning
Arrow
Interaction
Properties
| Property | Description | Type | Default | Require |
|---|---|---|---|---|
| placement | popper position | top | top-start | top-end | right | right-start | right-end | bottom | bottom-start | bottom-end | left | left-start | left-end | - | true |
| mode | positioning mode | fixed | absolute | fixed | false |
| middlewares | middleware | Array<Middleware> | - | false |