Button
Button
Buttons are used to initialize an action. Button labels express what action will occur when the user interacts with it.
Overview
Buttons are clickable elements that are used to trigger actions. They communicate calls to action to the user and allow users to interact with pages in a variety of ways. Button labels express what action will occur when the user interacts with it.
When to use
Use buttons to communicate actions users can take and to allow users to interact with the page. Each page should have only one primary button, and any remaining calls to action should be represented as lower emphasis buttons.
When not to use
Do not use buttons as navigational elements. Instead, use links when the desired action is to take the user to a new page.
(From Button documentation)
Parameters
The text to be displayed in the button.
Callback invoked when the button is clicked.
The modifier to be applied to the button.
Icon painter to be displayed in the button.
Whether the button is enabled or disabled.
A ButtonType that defines the button's type.
A ButtonSize that defines the button's size.
The MutableInteractionSource that keeps track of the button's state.