Link
Inline text that takes people somewhere: a record, a list or another page.
Master
Switch intent, external and disabled. Without href the link acts in place, as a button that looks like a link.
Usage
Use Link for text that navigates, inside a sentence or as a value, like a ledger number, a parent account or View recent invoices. It is one component: children is the text, href is where it goes. It takes the size of the text around it. intent brand is the blue that says this is a link; neutral is for links inside quiet text and keeps an underline. external opens it in a new tab and adds the new-tab mark. Without href it acts in place, as a button that looks like a link, like opening a tab on the same page. disabled shows it in faint text that goes nowhere. For a column of links use LinkList; for a link in a table use a link Cell; for anything that changes data use Button. See contracts/link.json for the full contract.
Do's
- A value that opens its record, like a ledger number or a parent account.
- A link inside a sentence or a notice.
Don'ts
- Do not use Link for an action that changes data, like Delete or Save. Use Button.
- Do not use Link in a table cell. Use a link Cell.
- Do not stack Links into a list yourself. Use LinkList.
- Do not write Click here or More; the text says where it goes.
- Do not use raw hex.
<Link intent="brand" > View recent invoices </Link>