Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Shadcn Hint for React and Tailwind

Minimal tooltip for showing information.

Installation

bunx --bun shadcn@latest add https://kit.dev/r/hint.json

Usage

import { Button } from "@/components/ui/button";
import {
  Hint,
  HintContent,
  HintTrigger,
} from "@/components/ui/hint";
<Hint>
  <HintTrigger asChild>
    <Button variant="outline">Hover</Button>
  </HintTrigger>
  <HintContent>This is a hint</HintContent>
</Hint>

Accessibility

KeyDescription
Enter
Activate the focused control.
Space
Activate the focused control.

Demos

Controlled

Positions

API Reference

Hint

div

PropType
AttributeType

HintTrigger

button

PropType
AttributeType
CSS variableType

HintContent

div

PropType
AttributeType

HintArrow

div

PropType
AttributeType