Skip to content

Develop

<a class="tng-link">Default</a>
<a class="tng-link is-neutral">Neutral</a>

Links support variants for customized color and styling.

By default links will size with the font size of their content.

<p class="tng-text-body is-1">
This is body text with a
<a class="tng-link">link</a>
in it.
</p>

This is body text with a link in it.

Use a size modifiers to set a fixed size.

<a class="tng-link is-sm">Small</a>
<a class="tng-link is-md">Medium (default)</a>
<a class="tng-link is-lg">Large</a>
<a class="tng-link">
<i class="tng-icon icon-external-link" aria-hidden="true"></i>
<span>External Link</span>
</a>
<a class="tng-link">
<span>Continue</span>
<i class="tng-icon icon-arrow-right" aria-hidden="true"></i>
</a>

The Link component renders an anchor element. Links allow users to navigate between pages or sections while maintaining the visual hierarchy of buttons. They are used for actions that change context rather than trigger in-page processes.

Links are intended for inline or rich text components. Icons can be added but are optional, if the link is external the icon will be replaced by the external-link icon.

The LinkProperties extends <React.HTMLAttributes<HTMLAnchorElement>> which means it includes all standard HTML attributes that can be applied to an anchor element.

PropTypeDescriptionRequired
textstringVisible label of the link
opensInNewWindowLabelstringAccessibility label used by screen readers
sizesm | md | lgDefines the size of the Link
classNameClassValueCustom classes you want to apply to the anchor
iconToyotaIcon | LexusIconIcon name to display from the library
isNeutralbooleanApplies a neutral style to reduce the link’s visual emphasis
import { Link } from '@tmedxp/react-components';
const LinkExample = () => {
return (
<Link
href="https://www.toyota-europe.com"
text="Go to Toyota Europe"
opensInNewWindowLabel="(opens in a new window)"
linksize="md"
icon="external-link"
isNeutral={false}
/>
);
};
export { LinkExample };