Buttons

The button container creates a stylish call-to-action button.

Unlike other containers, Buttons are self-closing. You do not need a closing ::: tag.

Usage

Syntax:

::: button "Button Text" URL [options]
  • "Button Text": The text on the button. Wrap in quotes if it contains spaces.
  • URL: The target link.
    • Internal: /docs/intro
    • External: external:https://google.com (Opens in new tab)
    • Mail: mailto:support@example.com
  • [options]:
    • color:#hex (Custom background color)

Examples

1. Basic Internal Link

::: button "Get Started" /getting-started/installation
Get Started

2. External Link (New Tab)

::: button "View on GitHub" external:https://github.com/docmd-io/docmd
View on GitHub

3. Custom Color

::: button "Download PDF" /assets/docs.pdf color:#ff4757
Download PDF

Nesting

Because buttons are self-closing, they are safe to nest inside Cards, Tabs, or Steps without breaking the parent container.

::: card Downloads
Get the latest version:
::: button "Download v1.0" /download color:#2ecc71
:::
Downloads

Get the latest version:

Download v1.0