JellyFabConfig

@Immutable
@Stable
data class JellyFabConfig(val expandStagger: Long = 150, val collapseStagger: Long = 100, val secondaryExpandStagger: Long = 150, val secondaryCollapseStagger: Long = 80, val shadowOpacity: Float = 0.55f, val shadowBlurFactor: Float = 0.2f, val bounceFactor: Float = 0.18f, val secondaryLayerSpacingMultiplier: Float = 1.8f, val layerDistance: Dp = 80.dp)

Configuration for JellyFab animation feel, layout spacing, and motion physics.

Most of these values are "texture controls" — tweak them to make the FAB menu feel snappier, softer, slower, or more playful.

Constructors

Link copied to clipboard
constructor(expandStagger: Long = 150, collapseStagger: Long = 100, secondaryExpandStagger: Long = 150, secondaryCollapseStagger: Long = 80, shadowOpacity: Float = 0.55f, shadowBlurFactor: Float = 0.2f, bounceFactor: Float = 0.18f, secondaryLayerSpacingMultiplier: Float = 1.8f, layerDistance: Dp = 80.dp)

Properties

Link copied to clipboard
val bounceFactor: Float = 0.18f

How strongly the blob surface stretches at each bulge point. Increase for more “jelly wobble”.

Link copied to clipboard

Delay between each primary-layer FAB collapsing inward (ms). Generally slightly smaller than expandStagger for a quicker close.

Link copied to clipboard
val expandStagger: Long = 150

Delay between each primary-layer FAB expanding outward (ms). Higher values = more sequential "bloom" animation.

Link copied to clipboard

Base distance from the main FAB to the primary-layer FABs. Increase to spread items farther apart.

Link copied to clipboard

Delay between each secondary FAB collapsing back inward (ms). Smaller values = quicker collapse motion.

Link copied to clipboard

Delay between each secondary FAB expanding along the arc (ms).

Link copied to clipboard

Multiplier controlling how far secondary FABs extend outward relative to the primary layer distance.

Link copied to clipboard

Multiplier controlling how far the shadow softens/spreads when bulges animate.

Link copied to clipboard
val shadowOpacity: Float = 0.55f

Base opacity used when drawing the glowing soft shadow under the main FAB. Higher = darker shadow.