---
title: Link
description: Text link — inline right arrow, external top-right arrow.
---

`link()` builds a text link inside article content. Inline links get a
right arrow (→), external links a top-right arrow (↗), with a faint
underline that turns solid on hover.

## Inline

```ts
link({ label: 'Introduction', href: '/guides/example/' });
```

## External

```ts
link({
  label: 'GitHub repo',
  href: 'https://github.com/CelPlume/CelestPlume',
  external: true,
});
```

## Props

<PropsTable
  labels={{ prop: 'Option', type: 'Type', default: 'Default' }}
  type={{
    href: { type: 'string', required: true, description: 'Target URL.' },
    label: { type: 'string', required: true, description: 'Link text.' },
    external: { type: 'boolean', default: 'false', description: 'Opens in a new tab and renders the ↗ arrow.' },
    icon: { type: 'string', default: "''", description: 'Raw SVG string before the label.' },
  }}
/>

## Notes

- Arrows and underline come from the article styles (`.cpd-article a`);
  the builder only emits the markup.
- **Rule — no underline outside article text**: links inside any component
  (Button, Card, Dropdown item, Breadcrumb, Pagination, Callout, Tabs,
  Accordion, Step, heading anchor, Starlight aside…) are reset — no
  underline, no arrow. Only plain article links carry them. Adding a new
  component with links? Its `<a>` must join the `.cpd-article` reset list
  in `celestial-docs.css`.
