JGuang

Popover

Popover · Arco Design

Preview
npm install @arco-design/web-react@2.66.18

Popover

A floating card popped by hovering, focusing, or clicking on a element.

Install

npm install @arco-design/web-react@2.66.18

Import @arco-design/web-react/dist/css/arco.css at the entry and set the locale with ConfigProvider. React 19 projects must also import @arco-design/web-react/es/_util/react-19-adapter first, or imperative APIs such as Message and Modal cannot render.

Examples

  • Basic: Basic usage.
  • Trigger: By setting trigger, you can specify different trigger methods.
  • Position: Popover supports 12 different positions. top left top top right bottom left bottom bottom right top left left bottom left top right right bottom right.
  • Manual close: Manual close popover. For more examples, see the Trigger component.

Examples come from the official Arco Design repository (MIT) at the commit published as npm 2.66.18. Some use online images or upload endpoints; network requests are disabled in previews.

API

Popover

PropertyDescriptionTypeDefaultValueVersion
blurToHideWhether close the popup when the target element losing focusbooleantrue-
defaultPopupVisibleWhether the popup is visible by defaultboolean--
disabledWhether to disabledboolean-2.11.0
popupHoverStayWhether the popup is visible when the mouse hovers over the popupbooleantrue-
popupVisibleWhether the popup is visibleboolean--
unmountOnExitWhether to destroy the popup when hiddenbooleantrue-
childrenPrefixSet an additional class name(${childrenPrefix}-open) for the container of the popup.string--
colorbackground color of the popup-layerstring-2.22.0
positionThe position of the popup relative to the target.| 'top'| 'tl'| 'tr'| 'bottom'| 'bl'| 'br'| 'left'| 'lt'| 'lb'| 'right'| 'rt'| 'rb'top-
triggerTrigger modeTriggerProps['trigger']hover-
contentThe content shown in popupReactNode--
classNameAdditional css classstring | string[]--
styleAdditional styleCSSProperties--
triggerPropsThe Props of the Trigger componentPartial<TriggerProps>--
getPopupContainerThe parent node which the popup will be rendered to.(node: HTMLElement) => Element--
onVisibleChangeCallback when the visibility of the popup is changed(visible: boolean) => void--
titleTitle of the popup card. Function types are supported in 2.48.0ReactNode | (() => ReactNode)--