Link
ProNavigation written as text: in a sentence, as a name, or on its own line. Underlined in text, routed like every library link, with new-tab handling. Not an M3 component (@windmorph/react-pro).
import { Link } from '@windmorph/react-pro';Part of Windmorph Pro, paid components on the free core, not on sale yet. See the Pro guide for what it includes and to register interest.
Props
Link 19 props
The link text.
Opens in a new tab, with
rel="noopener noreferrer", an "open in new" icon andlabels.newTabfor screen readers.Ref to the root element: the
<a>, or the<button>.inline(underlined, for links in running text),standalone(underlined on hover, for a link on its own line) orplain(never underlined or filled, for a logo or a photo tile; its content can style itself from the link's state withgroup-data-hovered/link:).primary, orinheritthe surrounding text colour (on coloured containers).inheritthe surrounding type, or a label role for a link on its own (sm,md,lg: label small, medium, large).Renders a link. Navigation goes through React Aria's
RouterProviderwhen one is set.The element is being dragged (e.g. a card picked up to move it): sets
data-draggedfor the dragged state layer. A consumer's owndata-draggedattribute counts too.Don't move focus to the element on press (set by menu triggers).
The value a submit button sends with its form, under its
name. On a toggle (toggle) it's astringnaming the button in a selection group instead, required to take part in the group's selection.
Events
Handler that is called when the press is released over the target.
Text
The words it announces, merged over the English defaults. A
LabelsProvidersets them for the whole app.
Classes for the root; they win over the defaults via
cn().Classes for each part.
Inline styles for the root element.
Handler that is called when a press interaction starts.
Handler that is called when a press interaction ends, either over the target or when the pointer leaves the target.
Handler that is called when the press state changes.
Handler that is called when a press is released over the target, regardless of whether it started on the target or not.
Also accepts every <a> or <button> attribute.
Spec status
Not part of Material Design 3: a Windmorph Pro component, built on M3's colour roles, type scale, shapes and motion. Its variants and configurations each link to a live example.
| Item | Status | Details |
|---|---|---|
| Inline, in running text | Built | Variant · In text |
| Standalone | Built | Variant · Standalone |
| Plain, around a logo or photo | Built | Variant · Plain |
| Colour: primary or inherit (on colour) | Built | Configuration · Standalone |
| Size: inherit, sm, md, lg | Built | Configuration · Standalone |
| External, in a new tab | Built | Configuration · In text |
Text that acts: onPress without href | Built | Use case · Button |
Inline, in running text
BuiltVariant · In text
Standalone
BuiltVariant · Standalone
Plain, around a logo or photo
BuiltVariant · Plain
Colour: primary or inherit (on colour)
BuiltConfiguration · Standalone
Size: inherit, sm, md, lg
BuiltConfiguration · Standalone
External, in a new tab
BuiltConfiguration · In text
Text that acts:
BuiltonPresswithouthrefUse case · Button
Theming & tokens
The colour is primary; with color="inherit" it defaults to the surrounding text's (currentColor), for links on a coloured container. Set the tokens below on a link or an ancestor. Each link carries data-tokens="wm-link", so a value set on an outer link no longer leaks into a link nested inside it. A standalone link has a 48px touch target, in an inner wrapper so the underline still reaches the text.
| Variable | Default | Paints |
|---|---|---|
--wm-link-color | var(--md-sys-color-primary)Varies with color. | The text, underline and icon (the surrounding text’s with `color="inherit"`). |
--wm-link-underline-thickness | 1px | The underline’s thickness. |
--wm-link-underline-offset | 0.2em | The gap between the text and its underline, in em so it follows the type. |