AnimatedIconButtonDirection
fun AnimatedIconButtonDirection(modifier: Modifier = Modifier, visible: Boolean = true, enabled: Boolean = true, icon: ToolkitIcon, contentDescription: String? = null, onClick: () -> Unit, durationMillis: Int? = null, autoAnimate: Boolean = true, feedback: ButtonFeedback = ButtonFeedback(), fromRight: Boolean = false, iconSize: Dp = SizeConstants.TwentyFourSize, ga4Event: Ga4EventData? = null)(source)
Icon action button with slide, fade, and scale visibility transitions. Icon replacements crossfade in place without replaying the entrance. Click feedback, playback, and analytics follow GeneralButton.
Its place in the row grows as it appears and narrows as it leaves, so the buttons beside it glide over instead of jumping once it is gone. The motion follows MaterialTheme.motionScheme, the app's motion tempo.
Parameters
durationMillis
A fixed duration for the entrance and exit, in place of the motion scheme's springs; null follows the motion tempo.
autoAnimate
Reveals a hidden button when visible becomes true. Disabling this leaves a hidden button hidden.
fromRight
Selects the physical right edge; false selects the left edge.