Skip to content
CraftDocs
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
NavHeadingMenu
NavIcon
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
Popover@xds/core v0.0.13 · XDSPopover

Usage

A click-triggered overlay anchored to a button or trigger element. Use it for secondary actions, inline confirmations, or supplementary information that does not warrant a full dialog. For hover previews use HoverCard, for brief helper text use Tooltip.
ts
import {XDSPopover} from '@xds/core/Popover'

Best practices

GuidancePractices
DoKeep popover content focused on a single task or piece of information.
DoProvide a clear way to close — either by clicking outside or with an explicit close button.
Don'tNest popovers inside other popovers — it creates confusing focus and navigation.
Don'tUse a popover for content that requires heavy user input — use a Dialog instead.
Don'tPut too much content in a popover — if it needs scrolling, use a Dialog instead.

Sub-components

Popover is a compound component with 1 sub-component.

XDSPopover

A click-triggered popover for displaying interactive content anchored to a trigger element.
PropTypeDescription
contentrequired
ReactNodeContent to display inside the popover.
children
ReactNodeTrigger element. Must contain a <button> or [role="button"] element.
anchorRef
React.RefObject<HTMLElement>External ref to use as the popover anchor in sibling mode.
placement
LayerPlacement (default: 'below')Position placement relative to the trigger.
alignment
LayerAlignment (default: 'start')Alignment along the placement axis.
isOpen
booleanWhether the popover is shown in controlled mode.
onOpenChange
(isOpen: boolean) => voidCallback fired when the popover visibility changes.
isEnabled
boolean (default: true)When false, trigger interactions are ignored.
width
number | string (default: 'auto')Width of the popover container.
label
stringAccessible label for the popover dialog.
hasCloseButton
boolean (default: true)Whether to include a hidden close button for accessibility.
closeButtonLabel
string (default: 'Close popover')Label for the hidden close button.
hasAutoFocus
boolean (default: true)Whether to auto-focus the first focusable element when the popover opens. Set to false for inline showcases or documentation previews.
xstyle
StyleXStylesStyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value — not an inline style object like style={{}}.

Examples

Common configurations, variations, and states.
Popover — Confirm Action
Inline confirmation popover for destructive actions with delete and cancel buttons.
Popover — Filter Panel
Popover with checkbox filters and apply/reset actions.
Popover — Keyboard Shortcuts
Popover displaying a list of keyboard shortcuts with key and description pairs.
Popover — Settings Panel
Popover with toggle switches for managing user preferences like notifications, dark mode, and sounds.