ToolkitFab
constructor(icon: ToolkitIcon, onClick: () -> Unit, label: String? = null, contentDescription: String? = label, size: FabSize = FabSize.Regular, color: FabColor = FabColor.Primary, expanded: Boolean = true, visible: Boolean = true, id: Any = label ?: contentDescription ?: icon)(source)
Parameters
icon
The button's icon. An animated vector or Lottie icon plays on each click.
onClick
What the button does.
label
Makes the button an extended one, with this text beside the icon.
contentDescription
What a screen reader says; defaults to label. Give one for a button without a label.
size
Material 3's floating action button sizes, for both plain and extended buttons.
color
Which container colour of the theme the button takes.
expanded
For an extended button: false folds it to its icon, as when a list scrolls.
visible
False scales the button out; it keeps its place in the list for when it returns.
id
Tells buttons apart as the list changes, so each animates in and out on its own. Defaults to the label or, without one, the content description.