Link Buttons

Learn how to create call-to-action buttons with different variants and icons


Link Buttons

Link buttons provide visually distinct call-to-action elements that guide users to important pages or resources.

Basic Usage

The simplest link button requires only an href attribute:

Get Started

Variants

Link buttons come in three variants to match different emphasis levels.

Primary (Default)

Use primary buttons for the most important actions:

Start Learning

Secondary

Secondary buttons are less prominent but still noticeable:

View Documentation

Minimal

Minimal buttons blend more with the text while still being clickable:

Learn More

Multiple Buttons

You can place multiple buttons together:

Get Started Read Docs View Examples

Icons

Add icons to make buttons more expressive.

Arrow Icons

Continue Go Back

Use for links to external resources:

View on GitHub

Other Icons

Download PDF Launch Now Popular Guide

Icon Placement

By default, icons appear at the end. Use iconPlacement to change this:

Icon at Start

Begin Course

Icon at End (Default)

Begin Course

External links automatically open in a new tab with security attributes:

Visit Example.com

This prevents window.opener vulnerabilities and improves security.

Real-World Examples

Course Landing Page

Start Web Development View Syllabus

Documentation Navigation

Quick Start Guide API Reference Examples

External Resources

GitHub Repository Join Community

Available Icons

The following icons are supported:

  • arrow or arrow-right
  • arrow-left
  • external
  • download
  • github
  • rocket 🚀
  • star
  • check
  • chevron-right
  • chevron-left
  • plus +

Best Practices

Use Primary Sparingly

Only use one primary button per section to maintain clear hierarchy:

Good:

Get Started Learn More

Avoid:

Get Started Learn More

Clear Button Text

Button text should be actionable and describe what happens when clicked:

Good:

  • "Get Started"
  • "Download Guide"
  • "View Documentation"

Avoid:

  • "Click Here"
  • "Link"
  • "More"

Always use the external icon or similar for external links:

Visit External Site

Accessibility

Link buttons are built with accessibility in mind:

  • Keyboard navigable (Tab to focus, Enter to activate)
  • Focus indicators for keyboard users
  • Proper ARIA attributes
  • Screen reader friendly
  • High contrast mode support
  • Respects prefers-reduced-motion

Responsive Design

Link buttons automatically adapt to smaller screens:

  • Full-width on mobile devices
  • Adjusted padding for touch targets
  • Proper spacing in button groups

Syntax Reference

:::link-button{href="URL" variant="VARIANT" icon="ICON" iconPlacement="PLACEMENT"}
Button Text
:::
Markdown

Attributes:

  • href (required) - Destination URL
  • variant (optional) - primary | secondary | minimal (default: primary)
  • icon (optional) - Icon name from available icons list
  • iconPlacement (optional) - start | end (default: end)
  • Link Cards: For rich preview cards with metadata
  • Cards: For grouped content blocks
  • Asides: For callouts and notes

Back to Markdown Features