Skip to main content

Popover

The floating card popped by clicking or hovering.

When To Use#

A simple popup menu to provide extra information or operations.

Comparing with Tooltip, besides information Popover card can also provide action elements like links and buttons.

Examples#

import { Position, Popover } from 'tailor-ui';

Basic#

Positioning#

With content hide#

With onVisibleChange#

Popover with Select#



Nested Usage#

API#

PropertyDescriptionTypeDefault
defaultVisibleWhether the floating popover card is visible by defaultboolean
visibleWhether the floating popover card is visibleboolean
onVisibleChangeCallback executed when visibility of the popover card is changed(visible: boolean) => void
positionThe position base on the children componentPositionsPosition.TOP
titleA string or react component inside this popover. If you are using click to trigger, it can be a function that with hide callback as first argumentReactNode | (handleClose: () => void) => ReactNode
contentA string or react component inside this popover. If you are using click to trigger, it can be a function that with hide callback as first argumentReactNode | (handleClose: () => void) => ReactNode
onOpenCompleteWhether to mount child components on onClose() => void
onCloseCompleteWhether to unmount child components on onClose() => void
WrapperThe wrapper of popover contentComponentType