Edit page


TextLink allows users to follow navigation.

Basic Usage

To implement the TextLink component, you need to import it first:

import { TextLink } from '@react-ui-org/react-ui';

And use it:

See API for all available options.

General Guidelines

Avoid using links for actions, use a Button instead. This is because users expect navigation to happen when clicking on something what looks like a link.

Custom Routing

It's common to use custom function for routing within SPAs. Use the onClick option to provide such function.

Forwarding HTML Attributes

In addition to the options below in the component's API section, you can specify React synthetic events or any HTML attribute you like. All attributes that don't interfere with the API are forwarded to the <a> HTML element. This enables making the component interactive and helps to improve its accessibility.

👉 Refer to the MDN reference for the full list of supported attributes of the a element.


Prop nameTypeDefaultRequiredDescription

Link’s href attribute.


Link label.


Custom PropertyDescription
--rui-TextLink__colorText color
--rui-TextLink__text-decorationText decoration, e.g. underline
--rui-TextLink--hover__colorText color on hover
--rui-TextLink--hover__text-decorationText decoration on hover