Rendyn

Component library

189 components

Interaction

Tooltip

Tooltip attaches supplemental content to one focusable child.

Interactive exampleReact Tailwind CSS

Practical React example

Explain an unfamiliar icon button without replacing its accessible name.

Before you copy and paste

Keep the example in the React rendering environment required by the imported component. Copy components/motion/tooltip.tsx and its returned support files from the Code tab; preserve the project-relative paths.

Listed package dependencies: clsx, lucide-react, motion, react, react-dom, tailwind-merge.

Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.

Explain an unfamiliar icon button without replacing its accessible name

// Usage adapted from beUI's pinned MIT source.
// Copyright (c) 2026 Saurabh Chauhan. See ./LICENSES.md.
"use client";

import { Heart, Settings, Share, Trash2 } from "lucide-react";
import { Tooltip } from "@/components/motion/tooltip";

export function TooltipPreview() {
  return (
    <div className="flex flex-col items-center gap-12">
      <div className="flex flex-wrap items-center justify-center gap-4">
        <Tooltip content="Like this post" side="top">
          <button type="button" aria-label="Like this post" className="inline-flex h-10 w-10 items-center justify-center rounded-full border border-border bg-card text-foreground press">
            <Heart className="h-4 w-4" />
          </button>
        </Tooltip>
        <Tooltip content="Share" side="bottom">
          <button type="button" aria-label="Share" className="inline-flex h-10 w-10 items-center justify-center rounded-full border border-border bg-card text-foreground press">
            <Share className="h-4 w-4" />
          </button>
        </Tooltip>
        <Tooltip content="Open settings" side="left">
          <button type="button" aria-label="Open settings" className="inline-flex h-10 w-10 items-center justify-center rounded-full border border-border bg-card text-foreground press">
            <Settings className="h-4 w-4" />
          </button>
        </Tooltip>
        <Tooltip content="Move to trash" side="right">
          <button type="button" aria-label="Move to trash" className="inline-flex h-10 w-10 items-center justify-center rounded-full border border-border bg-card text-foreground press">
            <Trash2 className="h-4 w-4" />
          </button>
        </Tooltip>
      </div>
      <p className="text-xs text-muted-foreground">Hover or focus each button. Content fades and un-blurs in.</p>
    </div>
  );
}

Usage example adapted from beUI's pinned MIT source. Retain the source licence notices when copying.

Use a real button or link as the child and give it its own label. Keep tooltip content short and nonessential to completing the task.

Customization

TooltipProps.content
Required; ReactNode.
TooltipProps.children
Required; ReactElement.
TooltipProps.side
Optional; Side.
TooltipProps.delay
Optional; number. Delay before showing (ms). Default 120.
TooltipProps.className
Optional; string.
TooltipProps.wrapperClassName
Optional; string. Classes for the outer wrapper span. Use to fix baseline / fill parent.

Integration notes

  • Put interactive controls in a popover rather than inside tooltip text.
  • Check focus as well as hover, and make the underlying action usable when no tooltip is shown.

Component source: beUI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.

Better with your agent

Give your agent taste.

The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.

All components are free. Sign up only to connect MCP.

Connect to MCP