@elemental-ui-alpha/popper
v0.0.2
Published
Provides a thin wrapper around the Popper.js API as a hook to help with tethering an element to an anchor.
Downloads
8
Readme
Popper
The usePopper
hook is a utility to help with tethering an element to an
anchor. It is used as a helper in components such as Tooltip
and Popover
.
import { usePopper } from '@elemental-ui-alpha/popper';
API
The hook is a thin wrapper around Popper.js, which allows a declarative approach. The signature is:
const [anchorRef, elementRef] = usePopper(isActive, configObject);