Skip to main content

Type Alias: NumberInputContextValue

type NumberInputContextValue = object;

Defined in: react/src/components/NumberInput/context.tsx:10

Properties​

atMax​

atMax: boolean;

Defined in: react/src/components/NumberInput/context.tsx:62


atMin​

atMin: boolean;

Defined in: react/src/components/NumberInput/context.tsx:61

Whether a stepper would have no effect, for aria-disabled.


blurOnEnter​

blurOnEnter: boolean;

Defined in: react/src/components/NumberInput/context.tsx:53

Whether Enter leaves InputField as well as committing.


changeValue​

changeValue: (next) => void;

Defined in: react/src/components/NumberInput/context.tsx:72

Drops the draft and replaces the value: steppers, wheel, keyboard, drag.

Parameters​

ParameterType
nextnumber

Returns​

void


clampValue​

clampValue: boolean;

Defined in: react/src/components/NumberInput/context.tsx:26


commitDraft​

commitDraft: () => void;

Defined in: react/src/components/NumberInput/context.tsx:70

Blur or Enter. Optionally clamps the draft, reports it, and drops it.

Returns​

void


disabled​

disabled: boolean;

Defined in: react/src/components/NumberInput/context.tsx:24


drag​

drag: number | null;

Defined in: react/src/components/NumberInput/context.tsx:38

Pixels of vertical drag on Stepper that move the value by one step.


dragCursor​

dragCursor: CSSProperties["cursor"];

Defined in: react/src/components/NumberInput/context.tsx:44

The cursor shown while a Stepper is dragged.


dragSensitivity​

dragSensitivity: ModifierValue<number>;

Defined in: react/src/components/NumberInput/context.tsx:40

How much a Stepper drag counts, per modifier key.


editing​

editing: boolean;

Defined in: react/src/components/NumberInput/context.tsx:57


format​

format: (value) => string;

Defined in: react/src/components/NumberInput/context.tsx:64

Parameters​

ParameterType
valuenumber

Returns​

string


inputRef​

inputRef: RefObject<HTMLInputElement | null>;

Defined in: react/src/components/NumberInput/context.tsx:81

InputField registers itself here; Root focuses it through its methods.


keepCaretOnStep​

keepCaretOnStep: boolean;

Defined in: react/src/components/NumberInput/context.tsx:51

Whether InputField puts the caret back after an arrow key steps the value.


keyboard​

keyboard: ModifierValue<InputEventOption> | null;

Defined in: react/src/components/NumberInput/context.tsx:36


max?​

optional max?: number;

Defined in: react/src/components/NumberInput/context.tsx:19


min?​

optional min?: number;

Defined in: react/src/components/NumberInput/context.tsx:18

The range the caller asked for. Left undefined when unbounded, which is what aria-valuemin / aria-valuemax and the steppers need to tell apart from a range that happens to sit at the edge of the safe integers.


nudge​

nudge: (direction, option, modifiers?) => void;

Defined in: react/src/components/NumberInput/context.tsx:74

Moves the value by one option in direction, normally +1 or -1.

Parameters​

ParameterType
directionnumber
optionModifierValue<InputEventOption>
modifiers?ModifierState

Returns​

void


outOfRange​

outOfRange: boolean;

Defined in: react/src/components/NumberInput/context.tsx:59

Whether the value sits outside min / max. Not judged while editing.


parse​

parse: (text) => number;

Defined in: react/src/components/NumberInput/context.tsx:65

Parameters​

ParameterType
textstring

Returns​

number


pointerLock​

pointerLock: boolean;

Defined in: react/src/components/NumberInput/context.tsx:42

Whether a Stepper drag hides the pointer and reads its movement.


range​

range: ValueRange;

Defined in: react/src/components/NumberInput/context.tsx:32

The effective scaling for applyDelta, with unbounded ends filled in. Ignores min / max when clampValue is off.


rawRange​

rawRange: ValueRange;

Defined in: react/src/components/NumberInput/context.tsx:34

The effective range for raw input, whose open ends cover finite numbers.


readOnly​

readOnly: boolean;

Defined in: react/src/components/NumberInput/context.tsx:25


scale​

scale: Scale;

Defined in: react/src/components/NumberInput/context.tsx:22

How the value is distributed across the travel.


selectOnFocus​

selectOnFocus: "all" | "number" | "none";

Defined in: react/src/components/NumberInput/context.tsx:47

What InputField selects when it takes focus.


setDraft​

setDraft: (text) => void;

Defined in: react/src/components/NumberInput/context.tsx:68

Typing. Replaces the draft and reports the parsed value, unclamped.

Parameters​

ParameterType
textstring

Returns​

void


step​

step: number;

Defined in: react/src/components/NumberInput/context.tsx:20


text​

text: string;

Defined in: react/src/components/NumberInput/context.tsx:56

What the input shows: the draft while editing, the formatted value otherwise.


unformatOnFocus​

unformatOnFocus: boolean;

Defined in: react/src/components/NumberInput/context.tsx:49

Whether InputField shows the plain value while it has focus.


value​

value: number;

Defined in: react/src/components/NumberInput/context.tsx:11