Fluid API
Fluid 컴포넌트의 API 문서예요. Fluid는 하위 폼 컴포넌트들이 컨테이너 너비에 맞게 꽉 차도록 만들어 주는 컴포넌트라서, props와 타입 구조를 정리해서 보여드릴게요.
출처: 문서
본문
Fluid
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?: FluidInstance) => undefined | CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: FluidInstance) => undefined | string) | null | The class name to apply to the component. |
| as | null | string | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent | ReactElement<unknown, string | JSXElementConstructor> | Iterable<ReactNode, any, any> | ReactPortal | Promise | null | The component type to render. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| instance | FluidInstance | 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: FluidInstance) => 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
Interfaces
| Label | Description | Data |
|---|---|---|
| PassThroughOptions | Defines passthrough(pt) options of Fluid component. | [object Object] |
Types
| Label | Description | Data |
|---|---|---|
| Instance | Instance of Fluid component. | [object Object] |
useFluid
Props
State
Exposes
Types
더 알아보기 (Learn more)
- Fluid의 사용 예시는 컴포넌트 문서 메인 페이지에서 확인하세요.
- Pass Through 탭에서 컴포넌트 커스터마이징 방법을 살펴보세요.