Skip to content

Link

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 link

Introduction walks through the docs.

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

Open the GitHub repo in a new tab.

link({
label: 'GitHub repo',
href: 'https://github.com/CelPlume/CelestPlume',
external: true,
});
OptionTypeDefaultDescription
hrefstringTarget URL (required).
labelstringLink text (required).
externalbooleanfalseOpens in a new tab and renders the ↗ arrow.
iconstring''Raw SVG string before the label.
  • 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.