infinite prop enables infinite loop scrolling, allowing users to continuously scroll through options without reaching an end.
Basic infinite scrolling
Enable infinite scrolling by setting theinfinite prop to true:
With
infinite={true}, scrolling past the last option wraps around to the first option, and vice versa. This creates a seamless, continuous scrolling experience.When to use infinite scrolling
Infinite scrolling is ideal for:Numeric ranges
Numbers that wrap around (0-9, 0-59 for minutes)
Circular data
Data that naturally loops (hours in a day, days of the week)
Small lists
Short lists where wrapping feels natural
Continuous values
Values without a clear start or end
Time picker with infinite scrolling
A practical example using infinite scrolling for hours and minutes:Day of week picker
Days of the week naturally wrap around, making them perfect for infinite scrolling:How it works
Infinite scrolling is implemented by duplicating options at runtime:visibleCount prop determines how many duplicates are created.
Infinite scrolling normalizes the scroll position using modulo arithmetic, so the picker always shows the correct option regardless of how many times you’ve looped around.
Infinite vs non-infinite
Here’s when to use each mode:| Feature | Infinite mode | Non-infinite mode |
|---|---|---|
| Wrapping behavior | Wraps around continuously | Stops at first/last item |
| Resistance effect | No resistance | Resistance at boundaries |
| Keyboard navigation | No Home/End keys | Home/End jump to start/end |
| Best for | Circular data, small lists | Linear data, large lists |
| Performance | Duplicates options | No duplication |
Configuration tips
Adjust visibleCount for smoother infinite scrolling
Adjust visibleCount for smoother infinite scrolling
The The default is
visibleCount prop affects how many options are duplicated in infinite mode. Higher values create more duplicates, which can make the infinite effect smoother but uses more memory.20, which works well for most use cases. Use multiples of 4 for best results.Avoid infinite scrolling with large lists
Avoid infinite scrolling with large lists
Infinite scrolling duplicates your options internally. For lists with hundreds of items, this can impact performance and memory usage. Consider using non-infinite mode for large datasets.
Next steps
Disabled options
Learn how to disable specific options
API reference
See all available props and configuration