Skip to content

Tooltip

A floating informational box that appears when hovering over an element.

Usage

tsx
import { PeacockTooltip, PeacockButton } from '@peacock-ui/core'

function Example() {
  return (
    <PeacockTooltip content="This will spread the plumage">
      <PeacockButton>Hover Me</PeacockButton>
    </PeacockTooltip>
  )
}

Props

PropTypeDefaultDescription
contentstring-The text to display inside the tooltip.
childrenReactNode-The element that triggers the tooltip on hover.
classNamestring-Additional CSS classes for the tooltip box.

Released under the MIT License.