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

Function TextField

starters/docs/src/TextField.tsx:21–37  ·  view source on GitHub ↗
({
  label,
  description,
  errorMessage,
  placeholder,
  inputRef,
  ...props
}: TextFieldProps)

Source from the content-addressed store, hash-verified

19}
20
21export function TextField({
22 label,
23 description,
24 errorMessage,
25 placeholder,
26 inputRef,
27 ...props
28}: TextFieldProps) {
29 return (
30 <AriaTextField {...props}>
31 {label && <Label>{label}</Label>}
32 <Input ref={inputRef} className="react-aria-Input inset" placeholder={placeholder} />
33 {description && <Description>{description}</Description>}
34 <FieldError>{errorMessage}</FieldError>
35 </AriaTextField>
36 );
37}
38
39export function TextArea({
40 label,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected