$ git show shimmer
Skeleton shimmer
Loading placeholder with a highlight sweeping across.
const sweep = {
from: { transform: [{ translateX: '-100%' }] },
to: { transform: [{ translateX: '200%' }] },
};
<View style={[styles.bone, { overflow: 'hidden' }]}>
<Animated.View
style={[StyleSheet.absoluteFill, {
width: '50%',
animationName: sweep,
animationDuration: '1.2s',
animationIterationCount: 'infinite',
animationTimingFunction: 'linear',
}]}>
<LinearGradient colors={['transparent', 'rgba(255,255,255,0.5)', 'transparent']}
start={{ x: 0, y: 0 }} end={{ x: 1, y: 0 }} style={StyleSheet.absoluteFill} />
</Animated.View>
</View>