Icon Button
Displays a Button with an Icon as the content.
Last updated
Displays a Button with an Icon as the content.
Last updated
Inherits from Button
Need a Button
that displays an icon instead of text? The IconButton
control is designed for this purpose. While you can often use a Border
with a TapGestureRecognizer
to customize content, this control is useful in scenarios where a Context Menu is needed but cannot be attached to a Border
.
IconClass
string
The icon to display.
IconFamily
The icon family to use. Defaults to FontAwesome.
IsActive
bool
Used to apply special styling when active (e.g., setting this to true
when a context menu opens).
IsActiveCssClass
string
The CSS class applied when IsActive
is true
.
InactiveCssClass
string
The CSS class applied when IsActive
is false
.
This example creates a circular IconButton
with a plus icon, styled as an outlined primary button.