Component reference
Link
Navigation links with consistent tone and emphasis.
Preview
Live previewOptional six-digit hex. Clear to restore the preset. Check contrast with your brand color.
Changes apply to this preview only.
Documentation
A list of links with a muted description.
Width adapts to the available space
"use client";
import {
Card,
CardHeader,
CardTitle,
CardDescription,
CardContent,
Link,
Text
} from "@pimolu/react";
export function DemoExample() {
return (
<div
className="grid grid-cols-[repeat(auto-fit,minmax(min(100%,280px),1fr))] gap-6 min-w-0 items-start"
>
<Card>
<CardHeader>
<CardTitle>Documentation</CardTitle>
<CardDescription>A list of links with a muted description.</CardDescription>
</CardHeader>
<CardContent>
<div className="grid gap-5 min-w-0">
<div className="grid gap-5 min-w-0">
<Link href="/components/link">Getting started</Link>
<Text tone="muted" size="sm">Install the packages and open the playground.</Text>
</div>
<div className="grid gap-5 min-w-0">
<Link href="/components/link">Themes and presets</Link>
<Text tone="muted" size="sm">Pick a palette, a radius and a density.</Text>
</div>
<div className="grid gap-5 min-w-0">
<Link href="/components/link">Component inventory</Link>
<Text tone="muted" size="sm">
Every family, its tests and its playground page.
</Text>
</div>
</div>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Footer</CardTitle>
<CardDescription>Muted links for secondary destinations.</CardDescription>
</CardHeader>
<CardContent>
<div className="flex flex-wrap items-center gap-3 min-w-0">
<Link href="/components/link" variant="muted">Privacy</Link>
<Link href="/components/link" variant="muted">Terms</Link>
<Link href="https://github.com/pimoludev/ui" external variant="muted">GitHub</Link>
</div>
</CardContent>
</Card>
</div>
);
}More examples
Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.
Variants
Enumerated from linkVariantMap: primary, muted and inherit.
Underline
Enumerated from linkVariantMap: hover, always and none.
External and disabled
external adds target and rel plus the arrow; disabled removes href and blocks the click handler.
Usage
Use Link for a destination and Button for a command; preserve href and normal browser link behavior.
API reference
Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.
PimoluLinkProps
Type source| Name | Type | Default | Description |
|---|---|---|---|
variant | "primary" | "muted" | "inherit" | undefined | "primary" | Colour treatment. Defaults to "primary". |
underline | "none" | "hover" | "always" | undefined | "hover" | When the underline appears. Defaults to "hover". |
external | boolean | undefined | false | Open in a new tab and add `rel="noopener noreferrer"` unless overridden. Also adds a small external icon by default. |
showExternalIcon | boolean | undefined | true | Hide the external icon while keeping the new-tab attributes. |
disabled | boolean | undefined | false | Prevent navigation and remove the href. |
childrenRequired | ReactNode | — | Public Pimolu prop; see the source declaration for details. |
type | string | undefined | — | Standard React/HTML attribute. |
defaultValue | string | number | readonly string[] | undefined | — | Standard React/HTML attribute. |
className | string | undefined | — | Standard React/HTML attribute. |
style | CSSProperties | undefined | — | Standard React/HTML attribute. |
aria-label | string | undefined | — | Defines a string value that labels the current element. |
onChange | ChangeEventHandler<HTMLAnchorElement, Element> | undefined | — | Standard React/HTML attribute. |
onClick | MouseEventHandler<HTMLAnchorElement> | undefined | — | Standard React/HTML attribute. |
variant"primary" | "muted" | "inherit" | undefinedDefault: "primary"
Colour treatment. Defaults to "primary".
underline"none" | "hover" | "always" | undefinedDefault: "hover"
When the underline appears. Defaults to "hover".
externalboolean | undefinedDefault: false
Open in a new tab and add `rel="noopener noreferrer"` unless overridden. Also adds a small external icon by default.
showExternalIconboolean | undefinedDefault: true
Hide the external icon while keeping the new-tab attributes.
disabledboolean | undefinedDefault: false
Prevent navigation and remove the href.
childrenRequiredReactNodeNo default extracted.
Public Pimolu prop; see the source declaration for details.
typestring | undefinedNo default extracted.
Standard React/HTML attribute.
defaultValuestring | number | readonly string[] | undefinedNo default extracted.
Standard React/HTML attribute.
classNamestring | undefinedNo default extracted.
Standard React/HTML attribute.
styleCSSProperties | undefinedNo default extracted.
Standard React/HTML attribute.
aria-labelstring | undefinedNo default extracted.
Defines a string value that labels the current element.
onChangeChangeEventHandler<HTMLAnchorElement, Element> | undefinedNo default extracted.
Standard React/HTML attribute.
onClickMouseEventHandler<HTMLAnchorElement> | undefinedNo default extracted.
Standard React/HTML attribute.
Accessibility
- Write meaningful link text and explain external destinations when needed without relying on an icon alone.