{"name":"link","title":"Link","description":"","kind":"component","category":"navigation","status":"beta","props":{"href":{"type":"string","description":"Where it goes."},"variant":{"type":"enum","values":["inline","standalone"],"default":"inline","description":"inline: inside a sentence, always underlined (1px, 3px under the text, 40% of the link's colour; full colour on hover). standalone: a link on its own line or at the end of a card (\"View all deploys\"): medium weight, no line at rest, the line on hover; its hit area is 40px tall on coarse pointers."},"tone":{"type":"enum","values":["accent","neutral"],"default":"accent","description":"accent: accent-ink, the link in product text. neutral: ink with an ink-3 underline (the line is all that marks it), for quiet text (a field hint, a footnote, terms)."},"external":{"type":"boolean","default":false,"description":"Opens in a new tab: target=_blank, rel=\"noopener noreferrer\", the arrow marker and the hidden label. A rel or target you pass wins."},"labels":{"type":"object","description":"{ external: '(opens in a new tab)' }, the hidden text read after an external link."}},"playground":{"name":"Playground","props":{"href":"#deploy-log","variant":"inline","tone":"accent"},"text":"read the deploy log"},"exampleFiles":[{"file":"deploy-failed","title":"Deploy failed (links in a sentence)"},{"file":"view-all-deploys","title":"View all deploys (standalone)"},{"file":"status-page","title":"Status page (opens in a new tab)"},{"file":"terms-hint","title":"Terms under a form (neutral)"}],"worstCase":[{"name":"A pasted URL in a narrow column","width":180,"props":{"href":"https://northwind.example/deploys/dpl_7f3a9c/logs?step=build&line=1284","external":true},"text":"https://northwind.example/deploys/dpl_7f3a9c/logs?step=build&line=1284"},{"name":"Right-to-left text","props":{"href":"#ar","variant":"standalone"},"text":"عرض كل عمليات النشر"},{"name":"One letter","props":{"href":"#a"},"text":"a"}],"anatomy":[{"part":"root","element":"a","description":"The anchor, with every attribute passed on (href, download, rel…). Wraps anywhere, so a pasted URL never overflows its column; its text keeps its own direction. 3px focus-ring radius on each line of a wrapped link."},{"part":"external","element":"span","optional":true,"description":"With external: the arrow-up-right icon (aria-hidden, 0.85em, mirrored right-to-left) held to the last word, not underlined, followed by a visually hidden label (\"(opens in a new tab)\")."}],"slots":{"default":"The link text (and an icon with data-slot=\"icon\", which takes 1em)."},"events":{},"states":["hover","press","focus-visible"],"tokens":["color.accent","color.accent-ink","color.ink","color.ink-2","color.ink-3","duration.fast"],"a11y":{"role":"link (native <a href>)","keyboard":["Tab reaches it; Enter follows it"],"notes":["Inline links are underlined at rest: colour alone does not tell a link from text.","An external link says so to screen readers (\"(opens in a new tab)\", visually hidden) and to sight (the arrow).","Name the destination in the text (\"read the deploy log\"), not \"click here\".","No visited colour: product links are navigation, the same link looks the same every time."]},"motion":["hover: colour and underline colour over duration.fast (a real pointer only)","press: the colour shifts at once (accent → accent; neutral → ink-2) and eases back over duration.fast on release; no scale (text links never scale)","focus: the global ring, never faded"]}