Tooltip

Free · MIT

Works with or without a TooltipProvider above; an app-level one sets the delay for all.

Markdown

Preview

Install

With the Candor CLI

First time? Get started sets up the registry and theme. Or with shadcn directly: npx shadcn@latest add @candor/tooltip

Brings in: render-prop, utils · npm: radix-ui@^1.8.1

Usage

TSX · The example above
"use client"

import { Button } from "@/components/ui/button"
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"

export default function Example() {
  return (
    <Tooltip>
      <TooltipTrigger asChild>
        <Button variant="outline">Retry step</Button>
      </TooltipTrigger>
      <TooltipContent>Runs the failed step again with the same input.</TooltipContent>
    </Tooltip>
  )
}

<Tooltip>

No props.

Also takes the props of React.ComponentProps<typeof TooltipPrimitive.Root>.

<TooltipTrigger>

No props.

Also takes the props of React.ComponentProps<typeof TooltipPrimitive.Trigger>RenderProp.

<TooltipContent>

No props.

Also takes the props of React.ComponentProps<typeof TooltipPrimitive.Content>.

<TooltipProvider>

No props.

Also takes the props of React.ComponentProps<typeof TooltipPrimitive.Provider>.