$ git show step-progress

Step progress

Basic/anim step-progress

A checkout-style progress line fills between steps and each dot lights up as it is reached.

Main · New Architecture only · worklets live in react-native-worklets
transitionPropertypercentage widthtransitionDelay
step-progress.tsx · reanimated 4
// Reanimated 4: a percentage width and per-dot transitions, delayed until the fill arrives
const STEPS = ['Cart', 'Address', 'Payment', 'Done'];
const pct = (step / (STEPS.length - 1)) * 100;

<View style={styles.row}>
  <View style={styles.track} />
  <Animated.View style={[styles.trackFill, {
    width: pct + '%',
    transitionProperty: 'width',
    transitionDuration: '400ms',
    transitionTimingFunction: 'ease-in-out',
  }]} />
  {STEPS.map((s, i) => (
    <Animated.View key={s} style={[styles.dot, {
      backgroundColor: i <= step ? '#2F54EB' : '#DADFE6',
      transitionProperty: 'backgroundColor',
      transitionDuration: '150ms',
      transitionDelay: i <= step ? '300ms' : '0ms', // light up when the line gets there
    }]} />
  ))}
</View>