Skip to content
WunderUI

Text Link Row

Free

A line of text followed by a link, such as “Don't have an account? Sign up”, or a back link with an arrow.

npx wunderui-cli add text-link-row

Playground

Don't have an account?Sign up

Installation

bash
npx wunderui-cli add text-link-row

Writes the source into your project with its dependencies and, on first use, the styles - see Installation.

Then import what you need:

tsx
import { TextLinkRow } from "@/components/blocks/auth"
import type { TextLinkRowProps } from "@/components/blocks/auth"

Then use it:

tsx
import { TextLinkRow } from "@wunderui/react"

export function SignInFooter() {
  return <TextLinkRow text="Don't have an account?" link="Sign up" href="/sign-up" />
}

Expected result: One line of grey text followed by a semibold indigo link. The link is underlined on hover and goes to /sign-up.

When to use

Use Text Link Row for

  • The line under a sign-in or sign-up form that names the other way in, such as Don't have an account? Sign up
  • A second line of help next to a field or a button, such as Resend, Change email or Contact support
  • The way back on a verification, reset or code screen

Use something else for

  • Button for the main step of a screen, such as Sign in or Continue
  • Alert for a hint or a warning without a link (size inline), or a message about the screen that needs attention

The link is a real anchor: give it an href to go somewhere, or a click handler that prevents the default to run an action. Leave the link out and only the text is shown.

Don't have an account?Sign up

Alignment

The row fills its container and starts at the left, and a class centres it or pushes it to the end. The back variant is as wide as its content and is moved by its container.

Don't have an account?Sign up

Content

The text and the link are two flex items, so a long text wraps in its own column and squeezes the link. Keep the text to one short sentence, or let the whole link drop under the text.

Don't have an account?Sign up

Keyboard interactions

The row itself handles no keys. The link and the back link are native anchors and work the way the browser makes them work.

TaborShiftTab
Moves focus to the link, or to the back link, and away from it again. The text is skipped.
Enter
Follows the focused link to its . With the handler runs first; call there to stay on the page.
Space
Does nothing on a link. The browser may scroll the page.

A link follows on Enter only. Space doesn't follow a link, as with any link, and the browser may scroll the page instead.

Behavior and motion

What the row does with its parts and its width, and what it leaves to you.

Variants
Inline is the 14 px line, small is 12 px tertiary, stacked puts text over the link, icon is small with a help icon, and back is one link with an arrow (an anchor, not a paragraph).
Link
The link goes to the href you pass, or to the top of the page by default. The click handler doesn't prevent the default, so app routes call preventDefault, and in back the whole row is the anchor.
Hover
The link is underlined on hover, and the back link turns from secondary to full text colour. Neither change is animated.
Focus
The back link takes the library's focus ring. The inline link shows the browser's default outline, which the docs theme draws in indigo, and both are visible.
Width and alignment
The row fills its container and starts at the left, and justify-center or justify-end moves it. The back variant is as wide as its content, and with items-center on a flex parent the row shrinks.
Long text
The text wraps inside its own box and the link keeps what is left, so a long sentence squeezes the link into a word-by-word column. Letting the row wrap moves the whole link under the text.
Semantics
The row reads as text followed by a link, and the icon is hidden from assistive technology. Choose link text that makes sense out of context, and wrap changing text in a status region.
Where it is used
Sign-in, sign-up, forgot-password, verification, OTP, onboarding and team-invite blocks use it for the line under the form and for the way back.
Motion and reduced motion
None. The underline and the back link colour change at once, and reduced motion changes nothing.

Anatomy

The figure shows the icon variant, the only one with all three parts. The back variant is a single anchor with an arrow and the text, 8 px apart, and no second link.

Need help?Contact support

  • data-slot="text-link-row"

    A paragraph that lays its children out in one flex line, centred, 4 px apart. It is as wide as its container, starts at the left and has no border or background.

  • Optional

    A 16 px help icon in front of the text, only in the icon variant. It sits 8 px from the text.

  • The text in a span: 14 px secondary for inline, 12 px tertiary for small and icon, 14 px tertiary for stacked.

  • Optional

    The link, semibold in the link colour, 14 px (12 px in small and icon) and underlined on hover. Without a link no anchor is rendered.

Best practices

  • Do

    Keep the text to one short sentence and the link to one or two words. The text states the situation and the link names where it leads, such as Don't have an account, then Sign up.

  • Do

    Give the link a real href when it goes somewhere, since the default scrolls to the top. For an action that stays on screen, like Resend, handle the click and change the text so people see it worked.

  • Do

    Centre the row under a centred card with justify-center. By default the row fills its container and starts at the left.

  • Do

    Use the back variant for the way out of a step, last on the screen. It carries only text, so a link passed with it is ignored.

  • Don’t

    Don't put a long sentence in the text. It wraps in its own column and squeezes the link, so in a narrow container let the link wrap under the text.

  • Don’t

    Don't use it for the main or a destructive action. A text link is easy to miss and has no pressed or loading state, so use a Button.

  • Don’t

    Don't leave the href at the default for a link you don't handle. The page jumps to the top and the history gets an entry.

API reference

TextLinkRow is a plain component, not a wrapper of a primitive, so this table lists every prop. It doesn't pass other props on to its element.

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

MCPget_component("text-link-row")
Installnpx wunderui-cli add text-link-row

The full library index for assistants is at /llms.txt.