Controls & Inputs
Physics Number Picker
관성 스크롤과 스냅 물리를 결합한 숫자 선택 입력 컴포넌트입니다.
Preview
value control
Physics Number Picker
drag or scroll to settle
24
Installation
bash
Copied
bash
Copied
bash
Copied
bash
Copied
Code
typescript
Copied
Props
className
- Type
- string
- Default
- -
- Description
- Additional classes merged onto the component.
value
- Type
- number
- Default
- -
- Description
- Controlled selected value.
defaultValue
- Type
- number
- Default
- -
- Description
- Initial value for uncontrolled usage.
min
- Type
- number
- Default
- 0
- Description
- Minimum selectable value.
max
- Type
- number
- Default
- 59
- Description
- Maximum selectable value.
onValueChange
- Type
- (value: number) => void
- Default
- -
- Description
- Called when the picker snaps to a new value.
wrap
- Type
- boolean
- Default
- true
- Description
- Whether values loop from max to min.
itemHeight
- Type
- number
- Default
- 56
- Description
- Height of each picker row in pixels.
visibleItems
- Type
- 5 | 7 | 9
- Default
- 7
- Description
- Odd number of visible rows.
formatValue
- Type
- (value: number, isSelected: boolean) => React.ReactNode
- Default
- -
- Description
- Custom renderer for each value.
label
- Type
- string
- Default
- "Number picker"
- Description
- Accessible spinbutton label.
style
- Type
- React.CSSProperties
- Default
- -
- Description
- Inline style and picker CSS variables.