Skip to content

Link

Allows users to navigate to other pages or external websites with clear hover underlines and accessible link styling.

1.7 KB
•
Updated on August 21, 2026

Installation

Bash

Usage

Code
Code

Features

Use asButton to render a link styled with our Button primitive variants (default, secondary, outline, ghost, destructive, destructive-outline) and sizes.

Pass standard HTML anchor attributes such as target="_blank" and rel="noopener noreferrer".

Next.js Client Routing

Pass NextLink to the render prop to take advantage of Next.js SPA navigation and prefetching.

Polymorphic Routing (render)

Because the Link primitive is built on Base UI, it renders as a native HTML <a> tag by default. This makes it 100% universal across all React setups (Vite, Next.js, Remix, Astro, TanStack Start).

When building a Next.js application, you can pass Next.js NextLink to the render prop to enable client-side navigation, automatic prefetching, and router cache:

Code

API Reference

Examples