MtNumberField component provides a specialized input for numeric values with optional controls and validation.
Import
Props
The value of the number field.
A label for your number field.
Defines if the number should be a floating point number or integer.
Defines the amount by which the number is increased or decreased per step.
Defines the minimum value of the number.
Defines the maximum value of the number.
Defines how many digits should be displayed after the decimal point.
Defines if digits should be filled with zeros.
Defines if the number should be aligned to the end of the input field.
Defines if the control arrows should be visible.
Placeholder text for the input.
Determines if the field is disabled.
Determines if the field is required.
Help text with additional information.
Error object for validation messages.
The size of the field.
Toggles the copy function.
Toggles the inheritance visualization.
Determines if the field is inheritable.
Events
Emitted when the value changes.
Emitted during input (before blur).
Emitted when input loses focus.
Emitted when inheritance is restored.
Emitted when inheritance is removed.
Slots
Content before the input.
Content after the input.
Additional hint content.
Usage
Basic Number Field
Integer Only
With Min and Max
Currency Input
Right Aligned
Without Controls
Accessibility
- Uses text input with numeric validation
- Arrow up/down keys increment/decrement value
- Increment/decrement buttons have descriptive aria-labels
- Min/max constraints enforced automatically
- Focus visible outline for keyboard navigation
- Disabled state prevents interaction