Popover

The floating box popped by clicking.

Import

import { Popover } from 'raw-ui';

Default

Hide arrow

Disabled

Placement

Controlled

Set parent element

API

PropDescriptionTypeDefault
contentcontent of popoverReact.ReactNode-
defaultValuedefault visible or not (uncontrolled)booleanfalse
valuevisible or not (controlled)boolean-
hideArrowhide popover arrowbooleanfalse
disableddisable popoverbooleanfalse
placementposition of the popoverPopoverPlacement'top'
strategyThe positioning strategy of popup'absolute' | 'fixed''absolute'
onChangechange event handler(value: boolean) => void-
getPopupContainerset the parent element of popup rendering() => HTMLElement | null-
...native propsReact.HTMLAttributes-

Type

import { PopoverPlacement } from 'raw-ui';

PopoverPlacement

type PopoverPlacement =
  | 'top'
  | 'topLeft'
  | 'topRight'
  | 'left'
  | 'leftTop'
  | 'leftBottom'
  | 'bottom'
  | 'bottomLeft'
  | 'bottomRight'
  | 'right'
  | 'rightTop'
  | 'rightBottom';