Internal ID software / Text
Link
A link that looks like one: underlined inside a sentence, plain when it stands alone.
Not drawn in Figma: built only from the tokens, for internal ID software. In code: components/software/typography.tsx. From the old system: Link in @id-identity-as/ui/layout.
Example
Se eksempelordren for detaljer.
Alle ordrerSe eksempelordren for detaljer.
Alle ordrerimport { Link } from '@/components/software/typography';
<Text>Se <Link href="/ordrer/41028">ordre 41028</Link> for detaljer.</Text>
<Link variant="block" as={NextLink} href="/ordrer">Alle ordrer</Link>Props
| Prop | Type | Default | What it does |
|---|---|---|---|
variant | 'inline' | 'block' | 'inline' | Inline is a link in a sentence, underlined. Block is a link on its own, such as a row in a list, underlined on hover. |
as | ElementType | 'a' | The element to render, such as the link of the framework. |
...anchor | AnchorHTMLAttributes | Everything a native anchor takes: href, target, rel. |
Do
- Use it for navigation. An action that changes something is a Button.
- Write the link text so it says where it leads: "ordre 41028", not "klik her".
Do not
- Do not colour a link. It is the text colour, and never Flare.
- Do not remove the underline from a link in a sentence.
Accessibility
- Links in running text are underlined: colour alone does not tell a link from the words around it.
- Focus shows the ring in the text colour.
Tokens it uses
- color.text.default