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

Function SearchField

starters/docs/src/SearchField.tsx:20–39  ·  view source on GitHub ↗
({
  label,
  description,
  errorMessage,
  placeholder,
  ...props
}: SearchFieldProps)

Source from the content-addressed store, hash-verified

18}
19
20export function SearchField({
21 label,
22 description,
23 errorMessage,
24 placeholder,
25 ...props
26}: SearchFieldProps) {
27 return (
28 <AriaSearchField {...props}>
29 {label && <Label>{label}</Label>}
30 <Search size={18} />
31 <Input placeholder={placeholder} className="react-aria-Input inset" />
32 <Button className="clear-button">
33 <X size={14} />
34 </Button>
35 {description && <Description>{description}</Description>}
36 <FieldError>{errorMessage}</FieldError>
37 </AriaSearchField>
38 );
39}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected