Number Flow React Native
Examples

Constrained Digits

Per-position digit constraints for clocks, timers, and custom ranges

The digits prop limits individual digit positions to custom ranges. Instead of the default 0–9 wheel, you can constrain a position to any maximum between 1–9. Here, every digit is constrained to { max: 1 }, turning each position into a binary flip (0 or 1).

Notes

  • { max: 1 } on every position creates a 2-element wheel (0, 1) instead of the default 10-element wheel (0–9). Each bit flips with a short, snappy roll.
  • The decimal value is converted to its binary representation via parseInt(n.toString(2)), then minimumIntegerDigits: 8 pads to a full byte.

TimeFlow automatically applies digit constraints internally (minutes tens: 0–5, hours tens: 0–2). The digits prop is for NumberFlow when you need custom constraints.

On this page