Button
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.

Widget API
onTap
Called when the button is tapped.
Type:
VoidCallbackDefault: required
label
A text to display in the button.
Type:
StringDefault: required
enable
Whether the toggle is enabled or not.
Type:
boolDefault:
true
kind
The kind that the button represents. It can be primary, secondary, danger, tertiary, ghost.
Type:
CButtonKindDefault:
CButtonKind.primary
size
The size of this button. It can be regular, sm, md.
Type:
CToggleSizeDefault:
CToggleSize.regular
icon
An optional icon to display in the button.
Type:
Widget?Default: optional
expand
Whether the button should fill the available width.
Type:
boolDefault:
false
labelSize
The size (in logical pixels) to use when painting the label.
Type:
doubleDefault:
14.0
onTap
Called when the button is tapped.
Type:
VoidCallbackDefault: required
icon
An icon to display in the button.
Type:
WidgetDefault: required
enable
Whether the toggle is enabled or not.
Type:
boolDefault:
true
kind
The kind that the button represents. It can be primary, secondary, danger, tertiary, ghost.
Type:
CButtonKindDefault:
CButtonKind.primary
size
The size of this button. It can be regular, sm, md.
Type:
CToggleSizeDefault:
CToggleSize.regular
Example
Last updated