PlaceholderTheme

class PlaceholderTheme(val color: Color = Color.Gray.copy(alpha = 0.35f), val shape: Shape = RectangleShape, val highlight: PlaceholderHighlight? = PlaceholderDefaults.fade, val placeholderFadeTransitionSpec: () -> FiniteAnimationSpec<Float> = { spring() }, val contentFadeTransitionSpec: () -> FiniteAnimationSpec<Float> = { spring() })

Theme-level defaults for the placeholder modifier.

Provide a PlaceholderTheme via ProvidePlaceholderTheme (or by writing to LocalPlaceholderTheme directly) so that any descendant Modifier.placeholder(...) call without explicit arguments picks up these values. Explicitly passed arguments always win over the theme.

Constructors

Link copied to clipboard
constructor(color: Color = Color.Gray.copy(alpha = 0.35f), shape: Shape = RectangleShape, highlight: PlaceholderHighlight? = PlaceholderDefaults.fade, placeholderFadeTransitionSpec: () -> FiniteAnimationSpec<Float> = { spring() }, contentFadeTransitionSpec: () -> FiniteAnimationSpec<Float> = { spring() })

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Default background color of the placeholder.

Link copied to clipboard

Default fade-in/out spec for the wrapped content.

Link copied to clipboard

Default highlight animation. null disables the highlight.

Link copied to clipboard

Default fade-in/out spec for the placeholder layer.

Link copied to clipboard

Default shape of the placeholder.