Popover
The floating box popped by clicking.
Import
import { Popover } from 'raw-ui';Default
Hide arrow
Disabled
Placement
Controlled
Set parent element
API
| Prop | Description | Type | Default |
|---|---|---|---|
| content | content of popover | React.ReactNode | - |
| defaultValue | default visible or not (uncontrolled) | boolean | false |
| value | visible or not (controlled) | boolean | - |
| hideArrow | hide popover arrow | boolean | false |
| disabled | disable popover | boolean | false |
| placement | position of the popover | PopoverPlacement | 'top' |
| strategy | The positioning strategy of popup | 'absolute' | 'fixed' | 'absolute' |
| onChange | change event handler | (value: boolean) => void | - |
| getPopupContainer | set the parent element of popup rendering | () => HTMLElement | null | - |
| ... | native props | React.HTMLAttributes | - |
Type
import { PopoverPlacement } from 'raw-ui';PopoverPlacement
type PopoverPlacement =
| 'top'
| 'topLeft'
| 'topRight'
| 'left'
| 'leftTop'
| 'leftBottom'
| 'bottom'
| 'bottomLeft'
| 'bottomRight'
| 'right'
| 'rightTop'
| 'rightBottom';