Releases: kmpbits/skeletal
Releases · kmpbits/skeletal
Release list
v0.3.0
Added
LoadState<T, F>— aLoading/Success/Failuresealed state, plus a
matchingSkeletonContainer(state, onFailure, content)overload for it.
Unlike theisFailure/dataOrNulloverload,state's shape is fixed
toLoadStatein exchange foronFailurereceiving a concretely typed
failure payload with no cast required.Loadingisn't special-cased by
the overload — it's whateverstateisn'tSuccessorFailure, so
the shimmer shows automatically with no extra branching needed.
Demonstrated in the sample app viaLoadStatePostCard.
Changed
SkeletonContainer(state, dataOrNull, isFailure, onFailure, content)'s
onFailureslot is now@Composable (S) -> Unit, receiving the failure
state directly instead of requiring callers to re-derive it from the
outerstate.
v0.2.0
Added
SkeletonContainer(state, dataOrNull, isFailure, onFailure, content)— a
state-driven overload for sealed/state-based loading (e.g. a
Loading/Success/Failurestate), derivingloadingand a typed
success payload from the caller's own state instead of a plain
Boolean, with a dedicatedonFailureslot. Demonstrated in the sample
app viaStateDrivenPostCard.
v0.1.0
Added
SkeletonContainer(loading)— hosts one shared shimmer animation per subtree.Modifier.skeleton(shape)— draws a placeholder matching the element's own
measured bounds while loading, crossfading to real content when it's done.
SupportsSkeletonShape.Auto(default),SkeletonShape.Circle, and
SkeletonShape.RoundedCorner(radius).SkeletonDefaults— corner radius,MaterialTheme-derived shimmer colors,
and crossfade animation defaults, all overridable perSkeletonContainer.- Android, iOS, and Desktop (JVM) targets.