Netzo Logo

tooltip

A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.

shadcn/ui radix-ui Storybook Figma

Usage

After installation components can be imported and used directly.

import {
  Tooltip,
  TooltipContent,
  TooltipProvider,
  TooltipTrigger,
} from 'netzo/components/tooltip.tsx'

Examples

Working examples to copy-paste into projects under components/.

Default

import { Button } from "netzo/components/button.tsx";
import {
  Tooltip,
  TooltipContent,
  TooltipProvider,
  TooltipTrigger,
} from "netzo/components/tooltip.tsx";

export default () => {
  return (
    <TooltipProvider>
      <Tooltip>
        <TooltipTrigger asChild>
          <Button variant="outline">Hover</Button>
        </TooltipTrigger>
        <TooltipContent>
          <p>Add to library</p>
        </TooltipContent>
      </Tooltip>
    </TooltipProvider>
  );
};