AnimatedExtendedFloatingActionButton

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)(source)

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

State ownership:

  • The caller owns visible, expanded, and click side effects.

  • This composable is intended as a render-only wrapper with shared interaction feedback.

Accessibility:

  • Ensure the passed icon and text communicate the same action intent.

Parameters

visible

Controls the visibility of the button. When true, the button is fully visible; when false, it's scaled down to nothing.

enabled

Controls the enabled state of the button. When false, the button is dimmed and unclickable.

onClick

The action to perform when the button is clicked.

icon

The icon to display within the button.

text

Optional text to display alongside the icon in the button.

expanded

Determines whether the button is in its expanded state (with text) or collapsed (icon only).

modifier

Modifier to apply to the button.

feedback

The feedback configuration for sound and haptics.

ga4Event

Optional GA4 event data to log on click.


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)(source)

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