npm.io
0.0.2 • Published 6 years ago

@elemental-ui-alpha/popper

Licence
—
Version
0.0.2
Deps
4
Size
7 kB
Vulns
0
Weekly
0

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);