Skip to content

    Browse components

    Lean Tip

    A tooltip that springs out of its trigger with a soft bounce, then drifts and leans after the pointer on a warm glow. Opens on focus, closes on Escape.

    Open
    Customize

    top
    bottom

    Installation

    npx shadcn@latest add @glint-ui/lean-tip

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/lean-tip.json

    Usage

    import { LeanTip } from "@/components/ui/lean-tip";
    
    <LeanTip content="Add to favorites">
      <button aria-label="Favorite"><Heart /></button>
    </LeanTip>

    Props

    PropTypeDefaultDescription
    contentstring"Add to favorites"Tooltip text (any ReactNode).
    side"top" | "bottom""top"Which side of the trigger.
    delaynumber150Ms before opening.
    follownumber0.3How far the bubble drifts toward the pointer.
    glowstring"#fb923c"Warm glow color.
    childrenReactNode—One focusable trigger element; it gets aria-describedby while open.
    classNamestring—Extra classes for the root element.