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

Function InputGroup

starters/docs/src/InputGroup.tsx:13–31  ·  view source on GitHub ↗
(props: InputGroupProps)

Source from the content-addressed store, hash-verified

11}
12
13export function InputGroup(props: InputGroupProps) {
14 let id = useId();
15 return (
16 <div className="input-group">
17 {props.label && (
18 <Label elementType="span" id={id}>
19 {props.label}
20 </Label>
21 )}
22 <Group {...props} aria-labelledby={id} className="react-aria-Group inset">
23 {composeRenderProps(props.children, (children, renderProps) => (
24 <InputContext.Provider value={{disabled: renderProps.isDisabled}}>
25 {children}
26 </InputContext.Provider>
27 ))}
28 </Group>
29 </div>
30 );
31}

Callers

nothing calls this directly

Calls 2

useIdFunction · 0.90
composeRenderPropsFunction · 0.85

Tested by

no test coverage detected