Link
Makes text interactive, allowing users to navigate to other pages or perform specific actions. Supports standard URLs, custom protocols, and navigation within Shopify or app pages.
Anchor to propertiesProperties
- Anchor to accessibilityLabelaccessibilityLabelstring
A label that describes the purpose or contents of the Link. It will be read to users using assistive technologies such as screen readers.
Use this when using only an icon or the content of the link is not enough context for users using assistive technologies.
- Anchor to commandcommand'--auto' | '--show' | '--hide' | '--toggle' | '--copy'Default: '--auto'
Sets the action the
should take when this clickable is activated.
See the documentation of particular components for the actions they support.
--auto
: a default action for the target component.--show
: shows the target component.--hide
: hides the target component.--toggle
: toggles the target component.--copy
: copies the target ClipboardItem.
- Anchor to commandForcommandForstring
ID of a component that should respond to activations (e.g. clicks) on this component.
See
command
for how to control the behavior of the target.- Anchor to hrefhrefstring
The URL to link to.
- If set, it will navigate to the location specified by
href
after executing theclick
event. - If a
is set, the
command
will be executed instead of the navigation.
- If set, it will navigate to the location specified by
- string
A unique identifier for the element.
- Anchor to langlangstring
Indicate the text language. Useful when the text is in a different language than the rest of the page. It will allow assistive technologies such as screen readers to invoke the correct pronunciation. Reference of values ("subtag" label)
- Anchor to targettarget'auto' | '_blank'
Specifies where to display the linked URL.
- Anchor to tonetone'auto' | 'neutral'
Sets the tone of the Link, based on the intention of the information being conveyed.
LinkElementProps
- accessibilityLabel
A label that describes the purpose or contents of the Link. It will be read to users using assistive technologies such as screen readers. Use this when using only an icon or the content of the link is not enough context for users using assistive technologies.
string
- command
Sets the action the `commandFor` should take when this clickable is activated. See the documentation of particular components for the actions they support. - `--auto`: a default action for the target component. - `--show`: shows the target component. - `--hide`: hides the target component. - `--toggle`: toggles the target component. - `--copy`: copies the target ClipboardItem.
'--auto' | '--show' | '--hide' | '--toggle' | '--copy'
- commandFor
ID of a component that should respond to activations (e.g. clicks) on this component. See `command` for how to control the behavior of the target.
string
- href
The URL to link to. - If set, it will navigate to the location specified by `href` after executing the `click` event. - If a `commandFor` is set, the `command` will be executed instead of the navigation.
string
- id
A unique identifier for the element.
string
- lang
Indicate the text language. Useful when the text is in a different language than the rest of the page. It will allow assistive technologies such as screen readers to invoke the correct pronunciation. [Reference of values](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) ("subtag" label)
string
- target
Specifies where to display the linked URL.
'auto' | '_blank'
- tone
Sets the tone of the Link, based on the intention of the information being conveyed.
'auto' | 'neutral'
export interface LinkElementProps extends Pick<LinkProps$1, 'accessibilityLabel' | 'command' | 'commandFor' | 'href' | 'id' | 'lang' | 'target' | 'tone'> {
target?: Extract<LinkProps$1['target'], 'auto' | '_blank'>;
tone?: Extract<LinkProps$1['tone'], 'auto' | 'neutral'>;
}
Anchor to eventsEvents
- Anchor to clickclick((event: CallbackEventListener<typeof tagName>) => void) | null
Callback when the link is activated. This will be called before navigating to the location specified by
href
.
LinkElementEvents
- click
Callback when the link is activated. This will be called before navigating to the location specified by `href`.
((event: CallbackEventListener<typeof tagName>) => void) | null
export interface LinkElementEvents {
/**
* Callback when the link is activated.
* This will be called before navigating to the location specified by `href`.
*/
click?: ((event: CallbackEventListener<typeof tagName>) => void) | null;
}
CallbackEventListener
(EventListener & {
(event: CallbackEvent<TTagName, TEvent>): void;
}) | null
CallbackEvent
TEvent & {
currentTarget: HTMLElementTagNameMap[TTagName];
}
Code
examples
Code
<s-link href="https://www.shopify.com/ca/legal/privacy">Privacy policy</s-link>
Preview

Anchor to best-practicesBest Practices
Use links primarily for navigation and use buttons primarily for actions.
The HTML that renders for the
s-button
ands-link
components includes style and accessibility information. Use these components intentionally and consistently to provide a more inclusive experience for assistive technology users and a more cohesive visual experience for sighted users.