The NumberField component provides a specialized input for numeric values with built-in increment/decrement controls and mouse scrubbing.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/yogendrarana/craftdotui/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Usage
Components
NumberFieldRoot
Controlled value.
Default value.
Callback when value changes.
Minimum value.
Maximum value.
Step increment.
Disable the field.
NumberFieldInput
Size variant. Options:
xs, sm, md, lg, xlVisual variant.
NumberFieldIncrement
Button to increment the value.NumberFieldDecrement
Button to decrement the value.NumberFieldScrubArea
Interactive area for mouse scrubbing to change values.NumberFieldScrubAreaCursor
Cursor icon shown during scrubbing.Examples
Basic Number Field
With Range and Step
With Scrub Area
Controlled
Accessibility
- Built on @base-ui/react for ARIA support
- Keyboard navigation (Arrow Up/Down, Page Up/Down)
- Screen reader announcements
- Increment/decrement buttons are keyboard accessible
- Proper min/max constraints