Skip to main content

Link

The Link component implements the Typography component, but requires an href and will always render an <a> tag.

Examples

Ideal for using with either a plain href or a third-party routing library via the as prop.

import { Link } from '@curology/ui-components-web/react/Link';

<Link href="./">A link</Link>

With multiple sizes

Each size of text can be used with the Link.

import { Link } from '@curology/ui-components-web/react/Link';

<Link
href="./"
size="{d1|d2|h1|h2|h3|subhead|body|body-lg|meta|cta}"
>A link</Link>

With a router library

import { Link } from '@curology/ui-components-web/react';
import { Link: RouterLink } from 'react-router-dom';

<Link as={RouterLink} to="./">A router link</Link>;

Props

LinkProps

NameTypeDefault ValueRequiredDescription
All attributes of a <a />
italicfalse | truefalseNoDisplay the text with emphasis?
size"body" | "h1" | "h2" | "h3" | "meta" | "inherit" | "d1" | "d2" | "subhead" | "body-lg" | "cta"'inherit'NoHow large should the text be? This also affects the font-face for display text.
weight"md" | "light" | "100" | "300" | "400" | "500" | "700" | "800" | "900" | "thin" | "normal" | "bold" | "extrabold" | "black"'normal'NoHow heavy should the text be?