Skip to content

NumberFieldProps beta ​

Interface of @v12-engine/client/kit

ts
export interface NumberFieldProps

What a NumberField is given: the number, what to tell when it changes, its limits and its look

Members ​

"aria-label" ​

ts
'aria-label'?: string;

Its name for a screen reader, when nothing next to it says it

ark ​

ts
ark?: Partial<Omit<ArkNumber.RootProps, 'value' | 'children' | 'class'>>;

The rest of Ark's number input, which it is (formatOptions, allowMouseWheel...): Ark's own, not the kit's to promise

class ​

ts
class?: string;

For the whole of it, where it sits: its width, its place in a row

disabled ​

ts
disabled?: boolean;

Whether it cannot be changed: dimmed

drag ​

ts
drag?: boolean;

Pressed and dragged up or down, the number goes up or down a step every few pixels (Shift ten times faster, Alt ten times finer), as in Unity; a press that does not move is a click into it, to type. Yes when left out

max ​

ts
max?: number;

What it is kept within at most: none, when left out

min ​

ts
min?: number;

What it is kept within: none, when left out

name ​

ts
name?: string;

Its name, for a form, and for a screen reader when nothing next to it says it

onEmpty ​

ts
onEmpty?: () => void;

Told when it is left empty: without, an empty field goes back to its number

onValue ​

ts
onValue: (value: number) => void;

Told the number when it is typed, stepped or dragged

placeholder ​

ts
placeholder?: string;

What it says while it has no number

readOnly ​

ts
readOnly?: boolean;

Whether it shows its number and can be selected, but not changed

settle ​

ts
settle?: boolean;

Once it has told a number, shows what the value is then: for a value that may be refused, or made to fit (a level above the highest), where what was typed would otherwise stay

size ​

ts
size?: 'sm' | 'md';

How big it is: md when left out

step ​

ts
step?: number;

How far a step of it goes (its buttons, the arrows, a drag): 1 when left out

steppers ​

ts
steppers?: boolean;

Its two small buttons that step it. Yes when left out

value ​

ts
value: number | undefined;

The number in it: none (undefined) leaves it empty, with placeholder