Put anything on a wheel.
A wheel reports a value for each item and shows a label for it. For strings and numbers, those are the item itself.
<Tambour.Wheel items={["AM", "PM"]} />Values and labels#
Pass { value, label } to show one thing and report another. Here the wheel shows a month's name and reports its number.
Your own data#
If your items have other names for those fields, read them with getValue and getLabel.
<Tambour.Wheel
items={countries}
getValue={(country) => country.code}
getLabel={(country) => country.name}
/>Custom rows#
renderItem draws a row's content. getLabel still provides the spoken text.
Without renderItem, rows are updated outside React and motion costs no renders. With it, keep the function stable, with useCallback or at module scope, so rows only render when their item changes.