Link
An inline text link, underlined on hover. With target='_blank' it appends an external-link icon.
Use for
- a text link to another page
- a link that opens in a new tab
- an inline link inside a sentence
Practices
| Guidance | Practice |
|---|---|
| Do | Pass render to use a router link while keeping the styles. |
| Don’t | Use it for an action that does not navigate. Use Button with variant='link' instead. |
API reference
Link
Renders an a, or the render element, and forwards its ref.
Slot: cl-link
| Prop | Type | Description |
|---|---|---|
color | 'primary' | 'neutral' | 'negative' | primary, neutral or negative.Default: 'primary' |
size | 'xs' | 'sm' | 'md' | 'lg' | xs, sm, md or lg.Default: 'md' |
target | string | _blank adds the external-link icon after the text. |
Examples
An external link
<Link href='https://clerk.com/docs' target='_blank'>Docs</Link>