Link
BetaActionsOpen in the workshop
Navigation inside running text or as a “see all” line under a card.
.xg-link · --arrowExample and markup
Live, from xg-ui.css and xg-ui.js. Switch the brand and mode on the example itself, or for the whole site in the header.
Fill rate is calculated from matched requests. View all reports
Markup
<p style="margin:0">Fill rate is calculated from <a class="xg-link" href="#">matched requests</a>. <a class="xg-link xg-link--arrow" href="#">View all reports</a>
</p>States
Hover, focus and pressed are forced here with .is-hover, .is-focus and .is-active so they can be seen side by side; in a product they come from :hover, :focus-visible and :active.
| State | Inline | Arrow |
|---|---|---|
| Default | View report | View report |
| Hover | View report | View report |
When to use it
Use it for
going somewhere: a report, the docs, a partner page.
Not for
doing something (that is a Button).
Rules
- Inline links are underlined; the arrow variant is for standalone “View all reports →”.
- External links say so with the external-link glyph and open in the same tab unless the user would lose work.
Accessibility
- Link text says where it goes; never “click here”.
- Link color passes 4.5:1 on page and card in every theme.
Every color pair this component uses is measured for both brands in light and dark on the Accessibility page.
Related
Also in Actions: Button, Icon button, Button group.
Status Beta: usable; class names may still change in a minor release, with a note (see Releasing).