Skip to content

Search Feitio

↵ opens the first↑↓ chooseEsc closes

Button

A button performs an action on the screen it is on: save, open, delete. To go to another page, it is a Link.

On this page

Playground

Variant
Size
State
Background
HTML
<button class="feitio-button" type="button">Save changes</button>

When to use

When not to use

Examples

Primary

The action the screen exists for. Orange, and at most one per screen.

Show code
HTML
<button type="button" class="feitio-button" data-variant="primary">Salvar alterações</button>

Default

Every other action. When in doubt, it is this one.

Show code
HTML
<button type="button" class="feitio-button">Cancelar</button>

Danger

Actions that destroy or cannot be undone. Wine, never orange, and always with a Dialog before acting.

Show code
HTML
<button type="button" class="feitio-button" data-variant="danger">Apagar agendamento</button>

With icon

The icon comes before the word and goes with it, never in its place.

Show code
HTML
<button type="button" class="feitio-button">
  <svg class="feitio-icon" aria-hidden="true"><use href="feitio/icons/sprite.svg#feitio-plus"/></svg>
  Novo agendamento
</button>

Sizes

Small for bars and tools, default for almost everything, large for the action of a whole page.

Show code
HTML
<button type="button" class="feitio-button" data-size="small">Pequeno</button>
<button type="button" class="feitio-button">Padrão</button>
<button type="button" class="feitio-button" data-size="large">Grande</button>

Anatomy

  1. Box: Feitio’s uneven corners and the 1px ink line.
  2. Icon, optional: always before the word.
  3. Label: verb and object.
  4. Focus: the orange outline, whenever the keyboard arrives.

States

Do and don’t

Do

Save changesCancel

A single orange, with verb and object.

Don’t

OKCancel

Two oranges and an "OK" that says nothing.

Writing

Accessibility

Attributes

AttributeValuesWhat for
class="feitio-button"requiredThe Feitio button.
data-variant"primary", "danger"Primary (orange) or danger (wine). Without it, the default.
data-size"small", "large"Small (32px, 40px touch) or large (52px).
aria-busy"true"While the action runs: it waits and ignores another tap.
Top