1. Documentation
  2. Components
  3. Button
ReadmeGitHub
  • Introduction
  • Quickstart
  • Text
  • Code
  • Lists
  • Tables
  • Accordion
  • Badge
  • Button
  • Callout
  • Code Block
  • Code Block Group
  • Code Snippet
  • Columns
  • Custom components
  • GitHub
  • Hover Card
  • Mermaid
  • Properties
  • Related Topics
  • Tabs
  • Tree
  • Images
  • Video
  • Files
  • Grain
  • Shade
  • Moss
  • Configuration
  • Content
  • Navigation
  • Site Identity
  • Appearance
  • Header and Footer
  • Fonts
  • Icons
  • Integrations
  • Search
  • OpenAPI
  • AI Chat
  • React Router
  • Astro
  • Next.js
  • Cloudflare
  • Vercel
  • robots.txt
  • sitemap.xml
  • JSON-LD
  • rss.xml
  • llms.txt
  • llms-full.txt
  • .md endpoints

Button

Add a clear call to action or a styled documentation link.

Loading documentation…

Badge< PreviousCalloutNext >

Powered by heyo

On this page

Variants and alignmentPresent a clear next stepProperties
Start building
<Button href="https://heyo.sh/heyo-docs/quickstart">Start building</Button>

Button gives a documentation call to action the same visual language as the rest of the site. Add href to render a link, or omit it for a regular button when the page supplies an interaction. The component handles the layout around the control, so it can sit naturally between blocks of MDX content.

Variants and alignment

Use the default variant for the primary next step. outline, secondary, and ghost work well for supporting actions, while destructive should be limited to irreversible or dangerous actions. Use align to place a standalone action in the reading column.

Configure your site

For external destinations, set target="_blank"; the component adds a safe noreferrer relationship unless you supply a different rel value.

Present a clear next step

Pair a primary action with supporting choices when a reader reaches a natural decision point in a guide.

Ready to publish?

Validate the site locally, then send it to your preferred host.

Deploy to Vercel

Use Cloudflare

<div className="rounded-xl border border-foreground/10 bg-muted/30 p-5"><p className="mb-1 text-sm font-medium text-foreground">Ready to publish?</p><p className="mb-4 text-sm text-muted-foreground">  Validate the site locally, then send it to your preferred host.</p><div className="flex flex-wrap gap-2">  <Button href="https://heyo.sh/heyo-docs/deploying/vercel">Deploy to Vercel</Button>  <Button href="https://heyo.sh/heyo-docs/deploying/cloudflare" variant="outline">    Use Cloudflare  </Button></div></div>

Properties

hrefstringoptional

Makes the button render as a link to this destination. Omit it for a native button.

variant"default" | "outline" | "secondary" | "ghost" | "destructive" | "link"optional

Selects the visual importance of the action. It defaults to default.

size"xs" | "sm" | "default" | "lg"optional

Controls the button's size. It defaults to default.

align"left" | "center" | "right"optional

Positions the button inside the documentation column. It defaults to left.

targetstringoptional

The link target. Use _blank when the destination should open in another tab.

relstringoptional

The relationship applied to a linked button. External targets default to noreferrer.

disabledbooleanoptional

Disables a native button and prevents interaction.

childrenReactNodeoptional

The action label or inline content.