Tooltip
Displays additional information on hover.
Import
import { Tooltip } from 'raw-ui';Default
Hide arrow
Disabled
Placement
Set parent element
API
| Prop | Description | Type | Default |
|---|---|---|---|
| content | content of tooltip | React.ReactNode | - |
| hideArrow | hide tooltip arrow | boolean | false |
| disabled | disable tooltip | boolean | false |
| placement | position of the tooltip | TooltipPlacement | 'top' |
| strategy | The positioning strategy of popup | 'absolute' | 'fixed' | 'absolute' |
| getPopupContainer | set the parent element of popup rendering | () => HTMLElement | null | - |
| ... | native props | React.HTMLAttributes | - |
Type
import { TooltipPlacement } from 'raw-ui';TooltipPlacement
type TooltipPlacement =
| 'top'
| 'topLeft'
| 'topRight'
| 'left'
| 'leftTop'
| 'leftBottom'
| 'bottom'
| 'bottomLeft'
| 'bottomRight'
| 'right'
| 'rightTop'
| 'rightBottom';