Skip to content

Link

import { Link } from 'yarcl';
<Link href="/docs">documentation</Link>
<Link href="https://example.com" external>example.com</Link>
<Link href="#" underline="hover" color="neutral">Underline on hover</Link>
  • Keep underline="always" (the default) for links inside running text, so they’re not identified by color alone.
  • external opens a new tab with rel="noopener noreferrer".

Accepts every native <a> attribute except color.

PropTypeDefaultDescription
colorColorconfigconfig.defaults.colorLink color, from the colors config.
externalbooleanOpens in a new tab with rel="noopener noreferrer".
underline'none' | 'hover' | 'always''always'When to underline. Keep 'always' for links inside running text, so they don't rely on color alone.