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

Function TokenField

starters/docs/src/TokenField.tsx:26–48  ·  view source on GitHub ↗
({
  label,
  description,
  placeholder,
  inputRef,
  style,
  children,
  ...props
}: TokenFieldProps<T>)

Source from the content-addressed store, hash-verified

24}
25
26export function TokenField<T extends TokenFieldValue = TokenFieldValue>({
27 label,
28 description,
29 placeholder,
30 inputRef,
31 style,
32 children,
33 ...props
34}: TokenFieldProps<T>) {
35 return (
36 <AriaTokenField {...props}>
37 {label && <Label>{label}</Label>}
38 <AriaTokenInput
39 ref={inputRef}
40 style={style}
41 data-placeholder={placeholder}
42 className="react-aria-TokenInput inset">
43 {children}
44 </AriaTokenInput>
45 {description && <Description>{description}</Description>}
46 </AriaTokenField>
47 );
48}
49
50export function Token(props: TokenProps) {
51 return <AriaToken {...props} />;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected