Link
A semantic anchor with Zenos visual treatments and sizes.
A semantic anchor for standalone navigation and links embedded in running text.
default
Read documentationmuted
View release notesprose
Build readable layouts with the composition guide and keep the link in the flow of the sentence.
Import
Section titled “Import”import { Link } from "@zentara-co/zenos-ui";Link or Button
Section titled “Link or Button”Use Link when activation navigates to another URL, file, or page location. Use Button for actions that change local state, submit data, or open an overlay. Styling an action like a link does not change its required semantics.
Variants
Section titled “Variants”Use default for standalone navigation at the surrounding text’s full emphasis. It shifts to the link accent on hover. Use muted when a secondary destination should begin at a lower emphasis, then gain the same accent on interaction.
Use prose inside paragraphs and other running text. It inherits the surrounding text color, stays underlined, and uses inline layout so a long link can wrap naturally with the sentence. Its underline and text both move to the link accent on hover.
subtle remains available as a compatibility alias for muted. Use contrary only for links placed on an inverse surface.
Sizes use the matching design-system body typography and scale SVGs placed inside Link.Icon.
Underline
Section titled “Underline”Standalone links default to none because their color change and surrounding navigation context provide the affordance. Use hover to reveal an underline on hover and keyboard focus, or always when the destination needs a persistent cue. prose always remains underlined, even when underline="none" is supplied.
Place Link.Icon before or after the label according to meaning. The icon is decorative and hidden from assistive technology, so the link text must remain understandable on its own.
Custom styling
Section titled “Custom styling”Use className with semantic tokens when a navigation treatment needs a distinct surface. Native anchor props and the Link focus treatment remain intact.
Composition
Section titled “Composition”Link renders a native anchor. Use render to apply the same color, size, underline, and focus treatment to another component, such as a router link, without wrapping it in a second anchor. Actions that change local state still belong on Button.
Put href, target, and rel on the rendered element when that element owns the destination. Link still accepts those anchor props when it renders its own anchor. Base UI joins className and style, runs both event handlers, and merges refs. If you pass a function, spread its props argument onto your element so the classes, data attributes, and ref stay attached.
The component you render must forward its ref and the props it receives to a DOM node. Do not put another link or button inside it. Place the label in Link’s children. If the rendered element already has children, those children are the visible label.
External destinations
Section titled “External destinations”For links that open a new tab, use target="_blank" with the appropriate rel policy and make the destination change clear through the label, surrounding copy, or a trailing icon. Link.Icon is decorative, so do not rely on the icon alone to communicate that context. The same target and rel pairing applies when those props live on the element passed to render.
Variants
defaultmutedprosesubtlecontraryunderline: hoverunderline: alwaysunderline: none Sizes
smmdlg Link Link.Icon
API
| Prop | Type | Default | Description |
|---|---|---|---|
variant | default | muted | prose | subtle | contrary | default | Treatment for standalone, secondary, inline prose, or inverse-surface navigation. Subtle is a compatibility alias for muted. |
underline | hover | always | none | none | Optional underline behavior; hover also underlines on keyboard focus. Prose always stays underlined. |
size | sm | md | lg | md | Body typography and composed SVG icon size. |
render | ReactElement | ((props, state) => ReactElement) | — | Composes Link styling onto another element, such as a router link. Base UI merges classes, styles, handlers, and refs. |
Link.Icon | HTMLAttributes<HTMLSpanElement> | — | Decorative leading or trailing icon wrapper hidden from assistive technology. |
native props | React.AnchorHTMLAttributes<HTMLAnchorElement> | — | Forwards native attributes, events, aria-*, data-*, className, style, and ref. |
Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props,
including className, style, aria-*, and data-*.
Accessibility
Section titled “Accessibility”Link renders a native anchor by default and preserves href, target, rel, download, ARIA, event, and ref behavior. With render, that contract moves to the element you supply, which must forward props and its ref. Use text that describes the destination instead of generic phrases such as “click here.” The visible focus ring supplements, but does not replace, a meaningful accessible name. Prefer the persistently underlined prose variant when color alone would be the only cue inside body copy.