What is the difference between ElevatedButton, TextButton, and OutlinedButton in Material Design, and how does each one's own distinct specific visual style typically indicate a genuinely different relative level of visual importance or emphasis?
Short answer
Material Design intentionally provides several distinct button styles specifically to help visually communicate a genuinely different relative level of importance or emphasis for a given action, with ElevatedButton featuring a prominent filled background and a subtle shadow…
Advertisement
AModel answer
Material Design intentionally provides several distinct button styles specifically to help visually communicate a genuinely different relative level of importance or emphasis for a given action, with ElevatedButton featuring a prominent filled background and a subtle shadow specifically intended for a screen's single most important primary action, OutlinedButton featuring just a visible border without any filled background specifically intended for a secondary, though still genuinely meaningful, action, and TextButton featuring no border or filled background whatsoever, appearing as simple plain styled text specifically intended for the genuinely lowest emphasis actions, such as a simple cancel option.
Row(children: [
TextButton(onPressed: cancel, child: Text('Cancel')),
ElevatedButton(onPressed: confirm, child: Text('Confirm')),
])Real-world example
A confirmation dialog properly uses an ElevatedButton for its primary confirm action and a considerably lower emphasis TextButton for the cancel action, correctly and visually guiding the user's attention naturally toward the screen's genuinely intended primary action.
Likely follow-ups
- How do you properly customize a specific button's own particular color while still consistently following your app's own overall central theme?
- What is the specific difference between FilledButton and ElevatedButton in the considerably newer Material 3 design system?
Related topics