본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

InputGroup API — 입력 필드 그룹 컴포넌트의 API 문서

원문 보기 위키 갱신

InputGroup은 여러 입력 요소를 하나의 그룹으로 묶어 보여 주는 컴포넌트예요. 루트(InputGroupRoot)와 애드온(InputGroupAddon) 파트로 나뉘며, 이 문서는 각각의 Props·Exposes와 useInputGroup 훅을 정리한 API 레퍼런스예요.

출처: 문서

본문

InputGroup 컴포넌트의 API 문서예요.

InputGroupRoot

Props

Name Type Default Description
ref Ref<unknown> null The reference to the component instance.
pIf boolean true Whether the component should be rendered.
style CSSProperties \| ((instance?: InputGroupRootInstance) => undefined \| CSSProperties) null The style to apply to the component.
className string \| ((instance?: InputGroupRootInstance) => undefined \| string) null The class name to apply to the component.
as null \| string \| number \| bigint \| boolean \| ComponentClass<any, any> \| FunctionComponent<any> \| ReactElement<unknown, string \| JSXElementConstructor<any>> \| Iterable<ReactNode, any, any> \| ReactPortal \| Promise<AwaitedReactNode> null The component type to render.
asChild boolean false Whether the component should be rendered as a child component.
instance InputGroupRootInstance null The instance to pass to the component.
pt SafeRecord<InputGroupRootPassThrough> null The pass-through props to pass to the component.
ptOptions PassThroughOptions null The pass-through options to pass to the component.
unstyled boolean null Whether the component should be rendered without classes.
dt unknown null The design token to use for the component.
styles StylesOptions<ComponentInstance> null The styles to use for the component.
render (instance: InputGroupRootInstance) => ReactNode null The render function to render the component with instance access.
children any null The children to render.

Accepts React.ReactNode for static content or a render function (instance: I) => React.ReactNode for instance access. Typed as any to avoid JSX type errors when used directly in templates. | | [key: string] | any | null | | | pt-{optionName}-* | - | null | Pass through attributes for customizing component. For more info, see Pass Through tab. |

State

Exposes

Name Type Default Description
rootProps UseInputGroupRootProps null Pre-built data attribute props for the root element.

Interfaces

Label Description Data
PassThroughOptions Defines passthrough(pt) options of InputGroup component. [object Object],[object Object]

Types

Label Description Data
Instance Instance of InputGroup component. [object Object]

InputGroupAddon

Props

Name Type Default Description
ref Ref<unknown> null The reference to the component instance.
pIf boolean true Whether the component should be rendered.
style CSSProperties \| ((instance?: InputGroupAddonInstance) => undefined \| CSSProperties) null The style to apply to the component.
className string \| ((instance?: InputGroupAddonInstance) => undefined \| string) null The class name to apply to the component.
as null \| string \| number \| bigint \| boolean \| ComponentClass<any, any> \| FunctionComponent<any> \| ReactElement<unknown, string \| JSXElementConstructor<any>> \| Iterable<ReactNode, any, any> \| ReactPortal \| Promise<AwaitedReactNode> null The component type to render.
asChild boolean false Whether the component should be rendered as a child component.
instance InputGroupAddonInstance null The instance to pass to the component.
pt SafeRecord<InputGroupAddonPassThrough> null The pass-through props to pass to the component.
ptOptions PassThroughOptions null The pass-through options to pass to the component.
unstyled boolean null Whether the component should be rendered without classes.
dt unknown null The design token to use for the component.
styles StylesOptions<ComponentInstance> null The styles to use for the component.
render (instance: InputGroupAddonInstance) => ReactNode null The render function to render the component with instance access.
children any null The children to render.

Accepts React.ReactNode for static content or a render function (instance: I) => React.ReactNode for instance access. Typed as any to avoid JSX type errors when used directly in templates. | | [key: string] | any | null | | | pt-{optionName}-* | - | null | Pass through attributes for customizing component. For more info, see Pass Through tab. |

Exposes

Name Type Default Description
inputgroup undefined \| null \| InputGroupRootInstance null Instance of the InputGroup component.

Interfaces

Label Description Data
PassThroughOptions Defines passthrough(pt) options of InputGroupAddon component. [object Object]

Types

Label Description Data
Instance Instance of InputGroupAddon component. [object Object]

useInputGroup

Props

State

Exposes

Interfaces

Types

더 알아보기 (Learn more)