Bonusway design system

Actions

TextLink

An inline link inside prose. Locale-aware for internal routes, and the only link component that belongs in the middle of a sentence.

import TextLink from '@/components/ui/TextLink';

Source: src/components/ui/TextLink.tsx

Examples

Underline policy

hover by default. always for a link inside a paragraph, where the underline is the only thing marking it as a link. none only when the surrounding layout already makes it obvious.

Sizes and weight

External

An absolute URL, mailto: or tel: opens in a new tab with rel="noopener". Nothing to configure — it is decided from the href.

Props

<TextLink> props

PropTypeDefaultDescription
hrefInternalHref | string—

Internal route (locale-aware, typed) or an external URL/mailto/tel string. Omit it (with an onClick) for a link-styled <button> — for actions whose destination isn't known until they run.

size'sm' | 'md' | 'lg''md'—
boldbooleanfalse—
italicbooleanfalse—
underline'always' | 'hover' | 'none''hover'

See UNDERLINE above. Defaults to `hover`.

classNamestring''—
onClickReact.MouseEventHandler<HTMLElement>——
disabledboolean—

Button mode only — link renders ignore it.

Also accepts everything in Omit<ComponentProps<typeof Link>, 'href' | 'className' | 'onClick'> — so native attributes (id, onClick, aria-*, data-*) pass straight through.

Usage

Do

  • Use it for navigation inside text, and Button href for navigation that is a call to action.
  • Make the link text describe the destination — “terms of service”, never “click here”.

Don’t

  • Don’t import next/link. It skips locale-aware routing and translated pathnames; ESLint blocks it.
  • Don’t style a Button to look like a link — that is what this is.

Related:Button

Tämä verkkosivusto käyttää evästeitä

Käytämme evästeitä parantaaksemme käyttökokemustasi sivustollamme ja mukauttaaksemme sinulle tarjoamaamme sisältöä. Tärkeät evästeet ovat välttämättömiä jotta palvelumme toimii oikein. Jos suostut siihen, että keräämme tietoja sinusta käyttämällä välttämättömiä evästeitä ja markkinointievästeitä, valitse "Hyväksy kaikki". Voit aina muuttaa valintaasi evästeasetuksista.

Evästeasetukset