Skip to content
CraftDocs
GitHub
Home
Home
Changelog
What's New
Guide
Guide
Getting Started
Principles
Styling Components
Theme System
Foundations
All Tokens
Color
Elevation
Icons
Motion
Shape
Spacing
Typography
Libraries
Libraries
@xds/cli
@xds/core
Themes
Themes
Theme: daily
Default Theme
Theme: matcha
Neutral Theme
Components
Components
AppShell
AspectRatio
Avatar
Avatar
AvatarStatusDot
Badge
Banner
Breadcrumbs
BreadcrumbItem
Breadcrumbs
Button
Button
IconButton
ToggleButton
ToggleButtonGroup
Calendar
Card
Carousel
Chat
ChatComposer
ChatComposerDrawer
ChatComposerInput
ChatComposerTokenElement
ChatDictationButton
ChatLayout
ChatLayoutScrollButton
ChatMessage
ChatMessageBubble
ChatMessageList
ChatMessageMetadata
ChatSendButton
ChatSystemMessage
ChatTokenizedText
ChatToolCalls
Checkbox
CheckboxInput
CheckboxList
CheckboxListItem
ClickableCard
Code
CodeBlock
Collapsible
Collapsible
CollapsibleGroup
useXDSCollapsible
CommandPalette
CommandPalette
CommandPaletteEmpty
CommandPaletteFooter
CommandPaletteGroup
CommandPaletteInput
CommandPaletteItem
CommandPaletteList
DateInput
Dialog
AlertDialog
Dialog
DialogHeader
useXDSImperativeAlertDialog
useXDSImperativeDialog
Divider
DropdownMenu
DropdownMenu
DropdownMenuDivider
DropdownMenuItem
DropdownMenuItemData
DropdownMenuSection
EmptyState
Field
Field
FieldLabel
FieldStatus
Heading
HoverCard
Icon
Kbd
Layout
Center
FormLayout
Grid
GridSpan
HStack
Layout
LayoutContainer
LayoutContent
LayoutFooter
LayoutHeader
LayoutPanel
Section
StackItem
VStack
Link
List
List
ListItem
Markdown
MetadataList
MetadataList
MetadataListItem
MobileNav
MoreMenu
NavIcon
NavMenuItem
NumberInput
OverflowList
Pagination
Popover
PowerSearch
ProgressBar
Radio
RadioList
RadioListItem
Resizable
ResizeHandle
useXDSResizable
SegmentedControl
SegmentedControl
SegmentedControlItem
SelectableCard
Selector
MultiSelector
Selector
SelectorOption
SideNav
SideNav
SideNavCollapseButton
SideNavHeading
SideNavItem
SideNavSection
Skeleton
Slider
Spinner
StatusDot
Switch
Table
BaseTable
Table
TableCell
TableHeaderCell
TableRow
useXDSTableColumnSettings
useXDSTablePagination
useXDSTableSelection
useXDSTableSelectionState
useXDSTableSortable
Tabs
Tab
TabList
TabMenu
Text
TextArea
TextInput
Thumbnail
TimeInput
Timestamp
Toast
Toast
useXDSToast
Token
Tokenizer
Toolbar
Tooltip
TopNav
TopNav
TopNavHeading
TopNavItem
TopNavMegaMenu
TopNavMegaMenuFeaturedCard
TopNavMegaMenuItem
TopNavMenu
TreeList
Typeahead
BaseTypeahead
Typeahead
TypeaheadItem
useXDSHoverCard
useXDSPopover
useXDSTooltip
Utilities
Utilities
LinkProvider
MediaTheme
SyntaxTheme
Theme
useClickableContainer
useEntryAnimation
useFocusTrap
useGridFocus
useImageMode
useInputContainer
useListFocus
useMediaQuery
useOverflow
useScrollLock
useScrollOverflow
useXDSLayer
useXDSStreamingText
Terms of UsePrivacy Policy
Type to search
↑↓Navigate↵SelectEscClose
Tooltip@xds/core v0.0.13 · XDSTooltip

Usage

A short text hint that appears on hover or focus, anchored to a trigger element. Use it to describe icon-only buttons, show the full text of truncated labels, or provide supplementary context without cluttering the UI.
ts
import {XDSTooltip} from '@xds/core/Tooltip'

Best practices

GuidancePractices
DoKeep tooltip content concise — aim for under 140 characters of plain text.
DoAdd a tooltip to icon-only buttons and controls that lack a visible label.
Don'tPlace interactive elements like links or buttons inside a tooltip — use HoverCard or Popover instead.
Don'tUse tooltips for essential information that users must see to complete a task.

Sub-components

Tooltip is a compound component with 1 sub-component.

XDSTooltip

Component wrapper for tooltip display triggered on hover or focus.
PropTypeDescription
children
ReactNodeTrigger element(s) that activate the tooltip.
anchorRef
RefObject<HTMLElement>External anchor ref for sibling mode.
content
ReactNodeTooltip content, typically short text.
placement
LayerPlacement (default: 'above')Position relative to the anchor element.
alignment
LayerAlignment (default: 'center')Alignment along the placement axis.
delay
number (default: 200)Show delay in milliseconds.
hideDelay
number (default: 0)Hide delay in milliseconds.
focusTrigger
'auto' | 'always' | 'never' (default: 'auto')Controls when focus events trigger the tooltip.
isEnabled
boolean (default: true)Enables or disables the tooltip triggers.
onOpenChange
(isOpen: boolean) => voidCallback fired when tooltip visibility changes. Called with true when shown and false when hidden.
hasHoverIndication
'auto' | boolean (default: 'auto')Shows a dashed underline on the trigger element.
isDefaultOpen
booleanWhether the tooltip should be shown on mount. Still dismissible.

Examples

Common configurations, variations, and states.
Tooltip — Action Bar
Tooltips on an action button bar with contextual descriptions.
Tooltip — Hook Usage
Tooltip using the useXDSTooltip hook for programmatic control.
Tooltip — Inline Text
Tooltips on inline text terms for definitions.