Link
Links navigate to another location or resource. Use them as standalone controls or, with appearance="underline" and no trailing icon, inside paragraphs and data tables. Prefer a real <a href> for navigation; use a Button for actions that do not change location.
Overview
The catnip-link custom element matches the Figma Link spec: appearances primary, secondary, tertiary, and underline; sizes s, m, and l; optional leading/trailing Catnip icons; hover/pressed icon pills on primary and tertiary; a pill :focus-visible ring; and a disabled presentation that does not navigate (renders as role="link" with aria-disabled).
Icons are off by default. Pass right-icon="arrow-right" (or .rightIcon="'arrow-right'") for the Figma trailing arrow. Use appearance="underline" for inline body copy and table cells.
Live example
Guidelines
- Use buttons for in-page actions (submit, open dialog, toggle). Use links for navigation and downloads.
- Primary is the default standalone/call-to-action treatment (brand color). Secondary and tertiary step the emphasis down. Underline is for inline copy.
- In paragraphs, alerts, table cells, and field-label actions, prefer
appearance="underline". - Add a trailing arrow with
right-icon="arrow-right"when the Figma icon treatment is needed. ProvideleftIcon/rightIconor the matching slots for other icons. - New tab:
target="_blank"automatically addsnoopenerandnoreferrertorelwhen missing, reducing tab-nabbing risk.