Link
Display a hyperlink component
Usage
The Link component provides a way to navigate between pages or sections.
Link Props
Prop | Type | Default |
---|---|---|
href | string | - |
variant | "primary" | "secondary" | "tertiary" | "emphasis" | "accent" | "attention" | "danger" | "success" | "accent" |
size | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 2 |
weight | number | "normal" | "bold" | "bolder" | 400 |
underline | boolean | - |
external | boolean | - |
download | string | boolean | - |
className | string | - |
Examples
Variant
Choose from different variants.
Size
The Link component supports 10 different sizes.
Weight
Control the visual emphasis of links with different font weights.
Styles
Additional style variations including underlined and external links.
Accessibility
The Link component follows accessibility best practices:
- Uses native
<a>
elements with properrole="link"
- External links include
target="_blank"
andrel="noopener noreferrer"
- External links have aria-labels indicating they open in new tabs
- Download links include appropriate aria-labels
- Maintains color contrast ratios for all variants