Package-level declarations

Types

Link copied to clipboard

Where a screen's floating action buttons go: the Toolkit scaffold around the screen holds one and draws what the screen puts in it, with ToolkitFabColumn.

Link copied to clipboard

Collapses extended FAB labels when content scrolls forward and expands them on reverse scrolling. Only consumed motion counts, so overscroll at either end does not change expanded.

Properties

Link copied to clipboard

The FabHost of the Toolkit scaffold around this point of the composition, if any.

Functions

Link copied to clipboard
fun AnimatedExtendedFloatingActionButton(modifier: Modifier = Modifier, visible: Boolean = true, enabled: Boolean = true, onClick: () -> Unit, icon: @Composable () -> Unit, text: @Composable () -> Unit? = null, expanded: Boolean = true, containerColor: Color = FloatingActionButtonDefaults.containerColor, feedback: ButtonFeedback = ButtonFeedback(), ga4Event: Ga4EventData? = null)

Content-slot overload for callers supplying a custom icon composition.

fun AnimatedExtendedFloatingActionButton(modifier: Modifier = Modifier, visible: Boolean = true, enabled: Boolean = true, onClick: () -> Unit, icon: ToolkitIcon, contentDescription: String? = null, text: @Composable () -> Unit? = null, expanded: Boolean = true, containerColor: Color = FloatingActionButtonDefaults.containerColor, feedback: ButtonFeedback = ButtonFeedback(), ga4Event: Ga4EventData? = null)

An animated extended floating action button that scales in and out based on its visibility.

Link copied to clipboard
fun AnimatedFloatingActionButton(modifier: Modifier = Modifier, isVisible: Boolean, icon: ImageVector, contentDescription: String? = null, onClick: () -> Unit, feedback: ButtonFeedback = ButtonFeedback(), ga4Event: Ga4EventData? = null)

FAB with caller-owned visibility and action, plus local saved toggle state. Clicks perform feedback and optional GA4 logging before onClick. Supply contentDescription to name the icon for accessibility.

fun AnimatedFloatingActionButton(modifier: Modifier = Modifier, isVisible: Boolean, icon: ToolkitIcon, contentDescription: String? = null, onClick: () -> Unit, feedback: ButtonFeedback = ButtonFeedback(), ga4Event: Ga4EventData? = null)

Icon-source overload; playback state is local to the composed button.

Link copied to clipboard

Puts fabs in the floating action button column of the Toolkit scaffold around this screen: a page's frame or the shell's tabs. They follow the screen's state, since this is called from the screen, and leave with it.

Link copied to clipboard
fun SmallFloatingActionButton(modifier: Modifier = Modifier, isVisible: Boolean, isExtended: Boolean, icon: ImageVector, contentDescription: String? = null, onClick: () -> Unit, feedback: ButtonFeedback = ButtonFeedback(), onLogClick: () -> Unit? = null)

Small FAB shown only when both isVisible and isExtended are true. The caller owns visibility and actions. Supply contentDescription to name the icon for accessibility.

fun SmallFloatingActionButton(modifier: Modifier = Modifier, isVisible: Boolean, isExtended: Boolean, icon: ToolkitIcon, contentDescription: String? = null, onClick: () -> Unit, feedback: ButtonFeedback = ButtonFeedback(), onLogClick: () -> Unit? = null)

Icon-source overload; playback state is local to the composed button.

Link copied to clipboard
fun ToolkitFabColumn(fabs: List<ToolkitFab>, modifier: Modifier = Modifier, spacing: Dp = 16.dp, feedback: ButtonFeedback = ButtonFeedback(), expanded: Boolean = true)

Draws fabs as a column at the bottom end of the screen, top to bottom in list order, so the last one, normally the screen's main action, sits in the corner. Each scales in and out on its own as it appears, disappears or changes ToolkitFab.visible.

Link copied to clipboard
fun ToolkitFloatingActionButton(fab: ToolkitFab, feedback: ButtonFeedback = ButtonFeedback(), expanded: Boolean = true)

One ToolkitFab, in the Material 3 button its size and label call for.