Skip to main content

Buttons

The theme provides .at-button classes for styling buttons and link elements as actionable controls. These are CSS classes rather than Astro components, so they work on any <button> or <a> element.

Usage

Add the at-button class to any button or anchor element:

<button class="at-button">Save changes</button>
<a href="/docs/" class="at-button">Browse docs</a>

Primary button

Variants

Outline

A bordered button with a transparent background, useful for secondary actions.

<button class="at-button at-button--outline">Cancel</button>

Outline button

Ghost

A minimal button with no border, useful for tertiary actions or navigation.

<button class="at-button at-button--ghost">Learn more</button>

Ghost button

Sizes

Two size modifiers are available alongside the default size.

<button class="at-button at-button--small">Small</button>
<button class="at-button">Default</button>
<button class="at-button at-button--large">Large</button>

Button sizes

Disabled state

Add the disabled attribute to a <button>, or aria-disabled="true" to an <a>.

<button class="at-button" disabled>Disabled</button>
<a href="/docs/" class="at-button" aria-disabled="true">Disabled link</a>

Disabled buttons

Combining variants

Size and style modifiers combine freely:

Combined variants

Notes

All button styles live in the at.components layer, so they can be overridden in higher-priority layers. Use <a> for navigation and <button> for actions.