Components
- Accordion
- Action BarUpdated
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- BadgeUpdated
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- CalendarUpdated
- CardUpdated
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context MenuUpdated
- Data List
- Date Picker
- DialogUpdated
- DrawerUpdated
- Editable
- FieldUpdated
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- MarqueeUpdated
- Menu
- Native Select
- Number InputUpdated
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- TableUpdated
- Tabs
- Textarea
- TimerUpdated
- ToastUpdated
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Hooks
Hint
Minimal tooltip for showing information.
For the full Tooltip component, check out the Tooltip component.
Installation#
pnpm dlx shadcn@latest add @shark/hint
Anatomy#
Hint ├── HintTrigger └── HintContent
Usage#
import { Hint, HintTrigger, HintContent } from "@/components/ui/hint";
<Hint> <HintTrigger /> <HintContent /> </Hint>
Hint vs Tooltip#
-
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.
Controlled#
Pass open and onOpenChange to controlled hint.
Examples#
Positions#
API Reference#
Hint#
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 |
HintTrigger#
Shows the hint on hover or focus. Button by default; use asChild for custom elements.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | - |
HintContent#
Hint content shown in a popover on hover or focus.
| Prop | Type | Default |
|---|---|---|
lazyMount | boolean | true |
unmountOnExit | boolean | true |
className | string | - |
asChild | boolean | - |
HintArrow#
Arrow pointing to the trigger. Rendered inside HintContent by default.
| Prop | Type | Default |
|---|---|---|
className | string | - |