Button

Variables

CSS Variable Default Value
--va-button-font-size var(--va-font-size-1)
--va-button-padding var(--va-space-3)
--va-button-border-width var(--va-border-width)
--va-button-border-color var(--va-border-color)
--va-button-background-color var(--va-background-color-default)

Default

<button class="va-button">Example button</button>

Action

<button class="va-button va-button--action">Example button</button>

Pressed

Use aria-pressed="true" for toggle buttons that are currently on.

<button class="va-button" aria-pressed="true">Example button</button>

Deprecated: va-button--active will be removed in 1.0. Use aria-pressed="true" instead.

Disabled

Use the disabled attribute. For elements that don’t support it, such as links styled as buttons, use aria-disabled="true". Also remove the link’s href: the styles only block mouse clicks, not keyboard activation.

<button class="va-button" disabled>Example button</button>
<a class="va-button" aria-disabled="true">Example link</a>

Deprecated: va-button--disabled will be removed in 1.0. Use the disabled attribute or aria-disabled="true" instead.