docs/components/hint
Sections
Components
Utilities
Forms
Hooks
Copy Markdown
Minimal tooltip for showing information.
For the full Tooltip component, check out the Tooltip component.
PreviewCode
Hover
CLIManual
pnpmbunnpmyarn
pnpm dlx shadcn@latest add @shark/hint
Hint
├── HintTrigger
└── HintContent
import { Hint, HintTrigger, HintContent } from "@/components/ui/hint";
<Hint>
<HintTrigger />
<HintContent />
</Hint>
Hint : A lightweight, minimal tooltip that shows information, no external dependencies.
Tooltip : A more complex component that provides a more full-featured tooltip with a variety of options.
Pass open and onOpenChange to controlled hint.
PreviewCode
Hover/Click to show hint Show hint
PreviewCode
Left
Top
Bottom
Right
Root wrapper. Provides hint context to trigger and content.
| Prop | Type | Default |
|---|---|---|
open | boolean | - |
defaultOpen | boolean | false |
onOpenChange | (open: boolean) => void | - |
positioning | Positioning | "{ placement: 'top', gutter: '10px' }" |
className | string | - |
| Attribute | Type | Default |
|---|---|---|
--gutter | string | 10px |
Shows the hint on hover or focus. Button by default; use asChild for custom elements.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | - |
Hint content shown in a popover on hover or focus.
| Prop | Type | Default |
|---|---|---|
lazyMount | boolean | true |
unmountOnExit | boolean | true |
className | string | - |
asChild | boolean | - |
Arrow pointing to the trigger. Rendered inside HintContent by default.
| Prop | Type | Default |
|---|---|---|
className | string | - |
[
Previous page
Frame ](/docs/components/frame)[
Next page
Hover Card ](/docs/components/hover-card)
On This Page
InstallationAnatomyUsageHint vs TooltipControlledExamplesPositionsAPI ReferenceHintHintTriggerHintContentHintArrow