MCPcopy
hub / github.com/chakra-ui/chakra-ui / UseNumberInputProps

Interface UseNumberInputProps

packages/number-input/src/use-number-input.ts:46–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46export interface UseNumberInputProps extends UseCounterProps {
47 /**
48 * If `true`, the input will be focused as you increment
49 * or decrement the value with the stepper
50 *
51 * @default true
52 */
53 focusInputOnChange?: boolean
54 /**
55 * This controls the value update when you blur out of the input.
56 * - If `true` and the value is greater than `max`, the value will be reset to `max`
57 * - Else, the value remains the same.
58 *
59 * @default true
60 */
61 clampValueOnBlur?: boolean
62 /**
63 * This is used to format the value so that screen readers
64 * can speak out a more human-friendly value.
65 *
66 * It is used to set the `aria-valuetext` property of the input
67 */
68 getAriaValueText?(value: StringOrNumber): string
69 /**
70 * If `true`, the input will be in readonly mode
71 */
72 isReadOnly?: boolean
73 /**
74 * If `true`, the input will have `aria-invalid` set to `true`
75 */
76 isInvalid?: boolean
77 /**
78 * Whether the input should be disabled
79 */
80 isDisabled?: boolean
81 /**
82 * Whether the input is required
83 */
84 isRequired?: boolean
85 /**
86 * The `id` to use for the number input field.
87 */
88 id?: string
89 /**
90 * The pattern used to check the <input> element's value against on form submission.
91 *
92 * @default
93 * "[0-9]*(.[0-9]+)?"
94 */
95 pattern?: React.InputHTMLAttributes<any>["pattern"]
96 /**
97 * Hints at the type of data that might be entered by the user. It also determines
98 * the type of keyboard shown to the user on mobile devices
99 *
100 * @default
101 * "decimal"
102 */
103 inputMode?: React.InputHTMLAttributes<any>["inputMode"]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…