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
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
Link@xds/core · XDSLink v0.0.13

Usage

A styled anchor for inline and standalone text navigation. Supports external links, underline variants, tooltips, and custom link components for router integration. Use it for navigating between pages or to external URLs.
ts
import {XDSLink} from '@xds/core/Link'

Best practices

GuidancePractices
DoWrite descriptive, concise link text that clearly communicates the destination.
DoSet `isStandalone` when the link appears outside of inline text, so it receives proper base font sizing.
Don'tUse Link for actions that do not navigate — use a Button instead.
Don'tUse generic text like "click here" or "read more" — describe the destination.
Don'tUse icon-only links without a visible text label.

Sub-components

Link is a compound component with 1 sub-component.

XDSLink

Styled anchor link with variants, external link support, and polymorphic rendering.
PropTypeDescription
labelrequired
stringAccessible label
childrenrequired
ReactNodeLink content
as
XDSLinkComponentTypeCustom component to render instead of <a>
href
stringLink destination URL
hasUnderline
boolean (default: false)Always show underline
isDisabled
boolean (default: false)Disables the link
isExternalLink
boolean (default: false)Opens in new tab with external icon
target
stringWhere to open linked document
onClick
MouseEventHandlerClick event handler
tooltip
stringTooltip text displayed on hover
isStandalone
boolean (default: false)Applies base font sizing

Examples

Common configurations, variations, and states.
Link — External LinksA vertical list of external links that open in a new tab with an indicator icon.
tsx
'use client';
​
import {XDSLink} from '@xds/core/Link';
import {XDSVStack} from '@xds/core/Layout';
​
export default function LinkExternalLinks() {
return (
<XDSVStack gap={2}>
<XDSLink
label="GitHub"
href="https://github.com"
isExternalLink
isStandalone>
GitHub
</XDSLink>
<XDSLink
label="MDN Web Docs"
href="https://developer.mozilla.org"
isExternalLink
isStandalone>
MDN Web Docs
</XDSLink>
<XDSLink
label="React Documentation"
href="https://react.dev"
isExternalLink
hasUnderline
isStandalone>
React Documentation
</XDSLink>
</XDSVStack>
);
}
Link — Inline TextA link embedded within a paragraph of body text.
tsx
'use client';
​
import {XDSLink} from '@xds/core/Link';
import {XDSText} from '@xds/core/Text';
​
export default function LinkInlineLink() {
return (
<XDSText type="body">
Read the{' '}
<XDSLink label="documentation" href="/docs">
documentation
</XDSLink>{' '}
for more information about using XDS components.
</XDSText>
);
}
Link — With TooltipsHorizontal row of standalone links with descriptive hover tooltips.
tsx
'use client';
​
import {XDSLink} from '@xds/core/Link';
import {XDSHStack} from '@xds/core/Layout';
​
export default function LinksWithTooltips() {
return (
<XDSHStack gap={4} vAlign="center">
<XDSLink
label="Settings"
href="/settings"
tooltip="Configure your account settings"
isStandalone>
Settings
</XDSLink>
<XDSLink
label="Profile"
href="/profile"
tooltip="View and edit your profile"
isStandalone>
Profile
</XDSLink>
<XDSLink
label="Help"
href="/help"
tooltip="Get help and support"
color="secondary"
isStandalone>
Help
</XDSLink>
</XDSHStack>
);
}

Showcase source

tsx
'use client';
​
import {XDSLink} from '@xds/core/Link';
​
export default function LinkShowcase() {
return (
<XDSLink label="Documentation" href="/docs" isStandalone>
Documentation
</XDSLink>
);
}