Number input
Number input is a form element that allows the user to enter a number. It provides a way to increase or decrease the value by using the plus and minus buttons.
Design system docs
Examples
Default number input
Statuses
Sizes
Importing
Importing React
Slots
Name Description feedback-icon
The custom icon of the feedback.
Attributes
Property Type Default Description label
string
The label of the input. placeholder
string
The placeholder of the input. description
string
The description of the input. tooltip
string
The tooltip of the input. status
'success' 'error'
The status of the input. Can be success
or error
. size
'sm' 'lg'
The size of the input. Default is sm
. Can be sm
or lg
. name
string
The name of the input. value
string
The value of the input. disabled
boolean
The disabled state of the input. Default is false. required
boolean
The required state of the input. Default is false. readonly
boolean
The readonly state of the input. Default is false. autofocus
boolean
The autofocus state of the input. Default is false. min
number
The minimum value of the number input. max
number
The maximum value of the number input. step
number
The step value of the number input. feedback
string
The feedback of the input. feedbackType
'info' 'success' 'error'
The feedback type of the input. Can be info
, success
, or error
. loading
boolean
The loading state of the input. Default is false. optional
boolean
The optional state of the input. optionalLabel
string
The optional label of the input. subtle
boolean
The weight of the label. Default is false
Events
Event Name Description dds-change
Fired when the input value changes. dds-input
Fired when the input value changes. dds-keydown
Fired when a key is pressed down. dds-blur
Fired when the input loses focus. dds-focus
Emitted when the input gains focus.
CSS Parts
Part Name Description postfix
The postfix of the input. decrement
The decrement button of the input. increment
The increment button of the input.