About
Enhanced shadcn/ui tooltip
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Tooltip to your project and fits it to your theme.
Code
How Tooltip is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { Button } from "@/components/ui/button";
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";
function Component() {
return (
<TooltipProvider delayDuration={0}>
<Tooltip>
<TooltipTrigger asChild>
<Button variant="outline" size="sm">
W/ image
</Button>
</TooltipTrigger>
<TooltipContent className="py-3">
<div className="space-y-2">
<img
className="w-full rounded"
src="https://cdn.21st.dev/assets/localized/8fe2431dd7f736ec677bd1a3216ab6d9a4e08d9a1d38d50fc96ad62e69ba738b.png"
width={382}
height={216}
alt="Content image"
/>
<div className="space-y-1">
<p className="text-[13px] font-medium">
Tooltip with title and icon
</p>
<p className="text-xs text-muted-foreground">
Tooltips are made to be highly customizable, with features like
dynamic placement, rich content, and a robust API.
</p>
</div>
</div>
</TooltipContent>
</Tooltip>
</TooltipProvider>
);
}
export { Component };
export default Component;














