Text Link

A link in text: #0060a9 at 450, navy on hover, never underlined. Focus draws the blue edge and halo around the text.

BetaReady to use. Its API can still change in a minor release; the changelog says when.

import { TextLink } from "@leap-crm/design-system";

Playground

Change a prop and the component follows. Its code is under Props.

Props

size
external
children

Best practices

When to use it, and the rules that apply in particular places.

GuidancePractice
DoUse it for navigation in text or as a quiet link in a header, like View all under a list of opportunities.
DoUse md in body text and sm in dense rows and section headers.
DoSet external for a page that opens somewhere else, so the ↗ says the link leaves the CRM.
DoPass your router's link element to render, so it keeps its own navigation and takes the link's look.
DoGive size="icon" an aria-label that says where it goes. It shows a bare ↗ with no text.
Don'tUse it for an action that changes data, like Archive or Send. Use Button: a link goes somewhere, a button does something.

Props

Also takes every prop of an <a>, like href, target and rel.

PropTypeDefaultDescription
size"md" | "sm" | "icon""md"md (14 px) for body text, sm (12 px) for dense rows, icon for a bare ↗ that needs an aria-label.
externalbooleanfalseAdds the ↗ after the label, for a page that opens somewhere else.
renderReactElement<{ className?: string; children?: ReactNode }>—Renders another element as the link, like a router Link, with the link's look.
childrenReactNode—What it shows inside.
classNamestring—Classes added to the root element, merged with its own. Tokens only.

Code

What the playground shows, ready to copy.

import { TextLink } from "@leap-crm/design-system";

<TextLink href="/text-link">View matter</TextLink>

Sizes

md (14 px) in body text, sm (12 px) in dense rows and section headers, icon for a bare ↗.

In a sentence

Jane Citizen has two open opportunities. See them in the pipeline.

As a router link

Pass your router's link element to render; it takes the link's look and keeps its own navigation.

Keyboard

The keys it answers to. Tab moves between components, arrows move within them.

KeysWhat they do
EnterFollows the link.