ToolkitFab
A floating action button, described rather than drawn: the Toolkit's scaffolds turn a list of these into a column of buttons at the bottom end of the screen, with the Toolkit's click sound, haptics, press bounce and animated icons.
listOf(
ToolkitFab(ToolkitIcon.Vector(Icons.Outlined.Search), onClick = ::search, size = FabSize.Small, color = FabColor.Secondary),
ToolkitFab(ToolkitIcon.Vector(Icons.Outlined.Add), onClick = ::add, label = "New item", expanded = !scrolled),
)Parameters
The button's icon. An animated vector or Lottie icon plays on each click.
What the button does.
Makes the button an extended one, with this text beside the icon.
What a screen reader says; defaults to label. Give one for a button without a label.
Material 3's floating action button sizes, for both plain and extended buttons.
Which container colour of the theme the button takes.
For an extended button: false folds it to its icon, as when a list scrolls.
False scales the button out; it keeps its place in the list for when it returns.
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.