← Components / Actions

Button

The M3 Expressive common button. Sizes range from extra small (32dp) to extra large (136dp). On press the corners morph toward a tighter radius on the fast spatial spring; toggle buttons switch shape when checked.

SwiftUIReact Native · Coming soonFlutter · Coming soon
FilledTonalOutlinedSquare

Usage

SwiftUI
M3EButton("Continue", icon: "arrow_forward", size: .medium) { next() }
M3EButton("Tonal", variant: .tonal) {}
M3EButton("Square", size: .large, shape: .square) {}
M3EToggleButton("Bold", icon: "format_bold", isOn: $bold)

API

PropertySwiftUIDescription
label_ label: StringButton text.
iconicon: String?Leading icon. Material Symbols name on Swift and RN.
size.extraSmall … .extraLargeContainer height 32 / 40 / 56 / 96 / 136.
variant.filled .tonal .elevated .outlined .textColor style.
shape.round | .squareResting shape. Pressing always morphs to a tighter corner.
checkedM3EToggleButton(isOn:)Toggle state; round buttons turn square when checked.
fillWidthfillWidth: BoolStretch to the available width.
overridesoverrides: M3EOverridesEscape hatches that win over the tokens.

Guidelines

  • Use one filled button per area for the primary action; use tonal or outlined for secondary actions.
  • Pick size by importance and touch target, not by text length. Small (40dp) is the default.
  • Keep labels short verbs: “Save”, “Continue”, “Start run”.
  • Use a toggle button for a persistent on/off state such as text formatting; use a switch for settings.