Skip to content

Anchor

Free

A text link for a sentence, a footer, or a View all line. It has three colors, four underline styles, and a mark for links to other sites.

  • Base UI
  • React 19
  • Tailwind CSS 4

Added Nov 8, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Pass href and the text.

release-note.tsx

Anchor

<a>
PropTypeDefaultDescription
tone"destructive""info""neutral""neutral"
underline"always""dotted""grow""hover""none""always"
variant"default""inherit""muted""default"
externalbooleanfalseOpens the link in a new tab (target="_blank", rel="noopener noreferrer") and adds the arrow icon. A target or rel prop wins.
From Base UIUseRenderBase UI docs
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<a> attributes—Every other attribute goes to the <a>, with a ref.
  • Use underline="always" in a sentence.
  • Use underline="hover" where the layout already marks the link, such as a footer.
  • Pass aria-current="page" for the page you are on.
  • For an action on the page, such as Retry or Undo, use a Button.
  • For the nav of a site, use a Navigation Menu.
TabMoves the focus to the link.
EnterFollows the link.

It renders an a, so a screen reader says it is a link.

A link in a sentence has no 44px target: a target would cover the lines above and below.

Color and line
hover · the text and the line get stronger
Grow
panel · `underline="grow"` draws the line from the start edge
  1. AddedAnchor.
Open the release