Link
An inline text link.
Derived from the Learn more link in Geist's Empty State.
Read the changelog to see what shipped this week.
import { Link } from "@replicas/ui";
export default function LinkDemo() {
return (
<p style={{ margin: 0 }}>
Read the <Link href="#">changelog</Link> to see what shipped this week.
</p>
);
}Examples
External
function External() {
return (
<Link href="https://base-ui.com" external>
Base UI
</Link>
);
}Prompt
Copy Prompt hands your agent everything it needs to build the Link in the Geist style: the measured tokens, the CSS and the structure.
Show Prompt
# Geist Link
An inline text link.
Build a Link in this project that looks and behaves like Geist's. Measured from the running Geist app (vercel.com/geist). Keep every value exact. Map the tokens onto the project's own theme variables instead of hard-coding them. Use the project's own component library for behaviour, or Base UI primitives if it has none.
Fidelity: Derived from the Learn more link in Geist's Empty State.
## Tokens
| Token | Light | Dark |
| --- | --- | --- |
| `--ds-gray-900` | `hsl(0 0% 30%)` | `hsl(0 0% 63%)` |
| `--ds-gray-1000` | `hsl(0 0% 9%)` | `hsl(0 0% 93%)` |
| `--ds-focus-ring` | `0 0 0 2px var(--ds-background-100), 0 0 0 4px var(--ds-focus-color)` | `0 0 0 2px var(--ds-background-100), 0 0 0 4px var(--ds-focus-color)` |
| `--ease-in-out` | `cubic-bezier(0.4, 0, 0.2, 1)` | `cubic-bezier(0.4, 0, 0.2, 1)` |
| `--duration-fast` | `0.1s` | `0.1s` |
## CSS
Scoped under `[data-style="geist"]`; dark rules sit under `[data-theme="dark"]`. The `ui-*` classes and data attributes match the structure below.
```css
[data-style="geist"] {
.ui-link {
display: inline-flex;
align-items: center;
gap: 2px;
border-radius: 4px;
color: var(--ds-gray-900);
font-size: inherit;
text-decoration: none;
transition: color var(--duration-fast) var(--ease-in-out);
@media (hover: hover) {
&:hover {
color: var(--ds-gray-1000);
}
}
&:focus-visible {
outline: none;
box-shadow: var(--ds-focus-ring);
}
}
.ui-link-external {
width: 16px;
height: 16px;
flex-shrink: 0;
}
}
```
## Structure
How Replicas assembles it on Base UI.
```tsx
import type { ComponentProps } from "react";
import { join } from "./utils";
export type LinkProps = ComponentProps<"a"> & {
variant?: string;
external?: boolean;
};
export function Link({ className, variant = "default", external = false, children, ...props }: LinkProps) {
return (
<a
className={join("ui-link", className)}
data-variant={variant}
{...(external ? { target: "_blank", rel: "noreferrer" } : null)}
{...props}
>
{children}
{external ? (
<svg className="ui-link-external" viewBox="0 0 16 16" fill="none" aria-hidden>
<path d="M6 4h6v6M12 4l-7.5 7.5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
</svg>
) : null}
</a>
);
}
```
## Example
```tsx
import { Link } from "@replicas/ui";
export default function LinkDemo() {
return (
<p style={{ margin: 0 }}>
Read the <Link href="#">changelog</Link> to see what shipped this week.
</p>
);
}
```
## Foundations
The rest of the Geist style, as a skill: https://replicas.raphaelsalaja.com/skills/geist/SKILL.md