Link

Styled anchor for navigation, standalone or inline within prose

Category: navigation · WCAG 2.2-AA · link, anchor, navigation

Variants

Sizes

Props

PropTypeDefaultDescription
variant'standalone' | 'inline'standaloneSelects the visual style variant.
size'sm' | 'md' | 'lg'mdVisual size of the component (e.g. 'sm', 'md', 'lg').
externalbooleanfalseWhen true, treats the link as external (opens in a new tab with rel safety).
hrefstringThe destination URL.
asChildbooleanfalseRender the single child element instead of cascivo's own `<a>`, so the link styling lands on your router's Link. ⚠ This — not `setLinkComponent` — is how you style an in-content link in a routed app; `setLinkComponent` only covers the config-driven navs. See docs/USING-WITH-A-ROUTER.md.

Design tokens

When to use

When not to use

How to build an accessible Link in React →

Examples

Standalone

<Link href="/docs">View documentation</Link>

Inline

Inline links inherit the surrounding font size and stay underlined.

<p>Read the <Link variant="inline" href="/guide">guide</Link> first.</p>

External

Opens in a new tab with rel="noreferrer" and a visual indicator.

<Link external href="https://example.com">Example</Link>

Related components

← Back to docs