MCPcopy Create free account
hub / github.com/adobe/react-spectrum / NumberField

Function NumberField

starters/docs/src/NumberField.tsx:21–38  ·  view source on GitHub ↗
({label, description, errorMessage, ...props}: NumberFieldProps)

Source from the content-addressed store, hash-verified

19}
20
21export function NumberField({label, description, errorMessage, ...props}: NumberFieldProps) {
22 return (
23 <AriaNumberField {...props}>
24 <Label>{label}</Label>
25 <Group>
26 <Input className="react-aria-Input inset" />
27 <Button slot="decrement" variant="secondary">
28 <Minus />
29 </Button>
30 <Button slot="increment" variant="secondary">
31 <Plus />
32 </Button>
33 </Group>
34 {description && <Description>{description}</Description>}
35 <FieldError>{errorMessage}</FieldError>
36 </AriaNumberField>
37 );
38}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected