Tooltip
A small label that shows when you point at something.
Add it to your project
Or install the packages yourselfTerminal
npm install @heroui/react lucide-react
First time with HeroUI? Set it up once.
The code
* @gravity-ui/icons.
*/
import {Info} from "lucide-react";
import {Button, Tooltip} from "@heroui/react";
export default function TooltipDemo() {
return (
<div className="flex items-center gap-4">
<Tooltip delay={0}>
<Button variant="secondary">Hover me</Button>
<Tooltip.Content>
<p>This is a tooltip</p>This comes with paid plans
The code for every component comes with paid plans, along with the rest of the AI toolkit. The first component under each heading is free.
Changed for this site: A default export (HeroUI's docs use named ones); lucide-react icons instead of @gravity-ui/icons.