Argent

Tooltip

A short hint. Opens on hover and focus on the web, and on a long press on React Native.

import { Button, Tooltip } from '@rajatweb/argent'

<Tooltip content="Copy link">
  <Button variant="outline">Share</Button>
</Tooltip>

Props

PropTypeDefaultWhat it does
children requiredReactElement<unknown, string | JSXElementConstructor<any>>Focusable element the tooltip describes.
content requiredstring
side'top' | 'right' | 'bottom' | 'left''top'

Accessibility

  • Describes its trigger to screen readers on both platforms.

Do

  • Use a few words.

Don’t

  • Hide anything people need.