Components

Buttons

Buttons are the shared action surface for submit, back, save, and related form actions.

Use this page to inspect default button treatment, alignment behavior, and loading-state hooks.

Preview

Button variants

The shipped theme includes these common button variants:

ClassPurpose
formie-buttonBase button styling
formie-button-primaryPrimary action treatment
formie-button-secondarySecondary action treatment
formie-button-ghostLow-emphasis action treatment
formie-button-iconIcon-only button treatment

Action-role classes also exist for default ordering and layout:

  • formie-button-back
  • formie-button-submit
  • formie-button-save

Browser attributes

Useful button-level hooks include:

AttributePurpose
data-formie-action="submit"Submit action button
data-formie-action="back"Back action button
data-formie-action="save"Save action button
data-formie-loading="true"Loading state marker
data-formie-loading-indicatorLoading indicator style metadata
data-formie-loading-textLoading text metadata

Group-level alignment uses:

AttributePurpose
data-formie-page-buttonsPage button wrapper
data-formie-buttons-positionAlignment and split-layout contract

Common position values include left, right, center, left-right, save-right, and save-left.

Button positions

Button groups use data-formie-buttons-position to control alignment and save-button placement.

Loading state

During an active submit cycle, Formie sets loading state on the active form and submitter. Keep those attributes intact if you replace button markup.

Accessibility notes

  • Buttons use :focus-visible styling from the theme token set.
  • Loading buttons remain visually active but should continue to communicate action state clearly.
  • Disabled buttons rely on reduced opacity plus disabled semantics.
Last updated: May 6, 2026, 3:46 PM