shadcn.io is not affiliated with official shadcn/ui
Framework
UI library
Radix UI does not include this primitive, so this page uses the Ark UI component. The visuals match the Ark UI version.
Installation
bunx --bun shadcn@latest add https://kit.dev/r/radix/hint.jsonUsage
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
| Key | Description |
|---|---|
Enter | Activate the focused control. |
Space | Activate the focused control. |
Demos
Controlled
Positions
API Reference
Hint
div
PropType
HintTrigger
button
PropType
className?stringAttributeType
CSS variableType
--gutterstringHintContent
div
PropType
AttributeType
data-placement?stringHintArrow
div
PropType
AttributeType
data-placement?string