StylishSkeletonLine

fun StylishSkeletonLine(modifier: Modifier = Modifier, color: Color = MaterialTheme.colorScheme.surfaceVariant, shape: Shape = RoundedCornerShape(4.dp), minAlpha: Float = 0.3f, maxAlpha: Float = 0.7f, durationMillis: Int = DefaultStylishAnimationTokens.durationLong, animate: Boolean = true)

A shimmering placeholder line used to indicate loading content. Renders a rounded rectangle whose opacity oscillates between minAlpha and maxAlpha to produce a shimmer effect.

Parameters

modifier

Modifier applied to the placeholder box. Use Modifier.width and Modifier.height to size it.

color

Base color of the placeholder. Defaults to MaterialTheme.colorScheme.surfaceVariant.

shape

Corner shape. Defaults to RoundedCornerShape with 4.dp.

minAlpha

Minimum opacity during the shimmer cycle.

maxAlpha

Maximum opacity during the shimmer cycle.

durationMillis

Duration in milliseconds of one full shimmer half-cycle (fade up or down). Defaults to DefaultStylishAnimationTokens.durationLong (500 ms).

animate

When true (the default) the opacity oscillates to produce the shimmer. When false the line renders statically at the midpoint of minAlpha and maxAlpha, for reduced-motion contexts.

See also