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
| Prop | Type | Default | Description |
|---|---|---|---|
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.