Skip to content
Stylhero 0.8.0
Components

Core

Layout and type

Inputs

Overlays

Navigation

Data display

Charts

Transitions and utilities

Page pieces (landing pages, portfolios, docs)

Icons

Components / Layout and type

Link

Styled text link. Renders your router's link when wrapped in <LinkProvider>.

import { Link } from "@stylhero/ui";

Example

Code
import { Link, Stack } from "@stylhero/ui";

function LinkExample() {
  return (
    <Stack gap={2}>
      <Link href="#props">Props table</Link>
      <Link href="https://github.com/raiburn/stylhero" external>Stylhero on GitHub</Link>
      <Link href="#props" tone="ink" muted>A quieter link</Link>
    </Stack>
  );
}

Props

PropTypeDefaultDescription
href required string -
external boolean - Opens in a new tab and adds an arrow that nudges on hover.
muted boolean -
stretched boolean - Makes the whole nearest positioned parent (e.g. a ghost Card) clickable.
tone "primary" | "ink" "primary" "ink": heading color, primary on hover, no underline. For titles that are links.

Also takes every <a> attribute (id, style, data-*, aria-*, event handlers…), passed to that element.

Generated from src/components/Link.tsx. Something wrong or missing? Open an issue.