INumberFieldProps
interface
Component Props
Props for <OrigamNumberField> — a numeric input with increment/decrement controls, precision formatting, min/max clamping, and hold-repeat support. Extends the full field and input surface plus variant styling.
TypeScript
Définition
La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.
Héritage
Hérite de
Interfaces parentes dont celle-ci hérite. Leurs propriétés sont disponibles pour tout consommateur de cette interface.
API
Propriétés
Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.
- autofocusboolean
- Automatically focus the input on mount.
- placeholderstring
- Placeholder text shown when the input is empty.
- persistentPlaceholderboolean
- Keep the placeholder visible even when the field has a value.
- rolestring
- Custom ARIA role for the input element.
- modelModifiersstring | boolean
- v-model modifiers passed through (e.g. lazy, number).
- insetboolean
- Moves the increment/decrement controls inside the input field.
- hideInputboolean
- Hides the numeric input, leaving only the increment/decrement buttons visible (e.g. a stepper-only UI).
- modelValuenumber | null
- Bound numeric value. Supports v-model. null represents an empty/unset state.
- minnumber
- Minimum allowed value. Decrement is disabled when modelValue <= min.
- maxnumber
- Maximum allowed value. Increment is disabled when modelValue >= max.
- stepnumber
- Amount to increment or decrement on each control press.
- precisionnumber
- Number of decimal places to display. Applied via toFixed() on the rendered value.
- incrementIconTIcon
- Custom icon for the increment button.
- decrementIconTIcon
- Custom icon for the decrement button.
- holdDelaynumber
- Milliseconds before hold-repeat kicks in when the control button is held down.
- holdRepeatnumber
- Milliseconds between repeated increment/decrement events while the button is held.
- splitboolean
- Places the increment and decrement buttons on opposite sides of the input (left/right).
- hideControlsboolean
- Hides the increment/decrement control buttons entirely, leaving a plain numeric input.
- compactboolean
- Reduces the field height for dense UIs.
- decrementAriaLabelstring
- incrementAriaLabelstring
Écosystème
Utilisé par
Composants et composables qui étendent ou consomment cette interface.
Usage
Exemples
Extraits de code prêts à coller utilisant cette interface.
Quantity stepper with min/max and hold-repeat