HoverCard
Display popover section when target element is hovered
Import
Source
Docs
Package
Usage
Delays
Set open and close delays in ms with openDelay
and closeDelay
props:
With interactive elements
HoverCard
is displayed only when the mouse is over the target element or dropdown,
you can use anchors and buttons within dropdowns, using inputs is not recommended:
HoverCard.Target children
HoverCard.Target
requires an element or a component as a single child –
strings, fragments, numbers and multiple elements/components are not supported and will throw an error.
Custom components must provide a prop to get root element ref, all Mantine components support ref out of the box.
Required ref prop
Custom components that are rendered inside HoverCard.Target
are required to support ref
prop:
Use forwardRef
function to forward ref to root element:
Accessibility
HoverCard
is ignored by screen readers and cannot be activated with keyboard, use it to display only additional information
that is not required to understand the context.