# IconField API API documentation for IconField component ## IconFieldRoot ### Props | Name | Type | Default | Description | |:------|:------|:------|:------| | ref | Ref | null | The reference to the component instance. | | pIf | boolean | true | Whether the component should be rendered. | | style | CSSProperties \\| ((instance?: IconFieldRootInstance) => undefined \\| CSSProperties) | null | The style to apply to the component. | | className | string \\| ((instance?: IconFieldRootInstance) => undefined \\| string) | null | The class name to apply to the component. | | as | null \\| string \\| number \\| bigint \\| boolean \\| ComponentClass \\| FunctionComponent \\| ReactElement> \\| Iterable \\| ReactPortal \\| Promise | null | The component type to render. | | asChild | boolean | false | Whether the component should be rendered as a child component. | | instance | IconFieldRootInstance | null | The instance to pass to the component. | | pt | SafeRecord | 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 | null | The styles to use for the component. | | render | (instance: IconFieldRootInstance) => 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 | UseIconFieldRootProps | null | Pre-built data attribute props for the root element. | ### Interfaces | Label | Description | Data | |:------|:------|:------| | PassThroughOptions | Defines passthrough(pt) options of IconFieldRoot component. | [object Object],[object Object] | ### Types | Label | Description | Data | |:------|:------|:------| | Instance | Instance of IconFieldRoot component. | [object Object] | ## IconFieldInset ### Props | Name | Type | Default | Description | |:------|:------|:------|:------| | ref | Ref | null | The reference to the component instance. | | pIf | boolean | true | Whether the component should be rendered. | | style | CSSProperties \\| ((instance?: IconFieldInsetInstance) => undefined \\| CSSProperties) | null | The style to apply to the component. | | className | string \\| ((instance?: IconFieldInsetInstance) => undefined \\| string) | null | The class name to apply to the component. | | as | null \\| string \\| number \\| bigint \\| boolean \\| ComponentClass \\| FunctionComponent \\| ReactElement> \\| Iterable \\| ReactPortal \\| Promise | null | The component type to render. | | asChild | boolean | false | Whether the component should be rendered as a child component. | | instance | IconFieldInsetInstance | null | The instance to pass to the component. | | pt | SafeRecord | 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 | null | The styles to use for the component. | | render | (instance: IconFieldInsetInstance) => 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 | |:------|:------|:------|:------| | iconfield | undefined \\| null \\| IconFieldRootInstance | null | The IconField component instance. | ### Interfaces | Label | Description | Data | |:------|:------|:------| | PassThroughOptions | Defines passthrough(pt) options of IconFieldInset component. | [object Object] | ### Types | Label | Description | Data | |:------|:------|:------| | Instance | Instance of IconFieldInset component. | [object Object] | ## useIconField ### Props ### State ### Exposes ### Interfaces ### Types