Components

Button Links

Use inline CTA buttons when an article should point readers to the next page or action.

1 min readUpdated

Use button links when a regular text link is too quiet and the article needs a clear next action.

Use in MDX

Add a ButtonLink block inside an .mdx article:

<ButtonLink href="/getting-started/compass-docs/write-your-first-article">Read the setup guide</ButtonLink>

You can also use the secondary variant:

<ButtonLink href="/getting-started/compass-docs/manage-docs" variant="secondary">
  Manage your docs
</ButtonLink>

Implementation notes

The component lives in src/components/docs/ButtonLink.astro. To change spacing, colors, or variants, update that file and the shared .button, .button-primary, and .button-secondary styles in src/styles/global.css.

Preview