Component registry
Fabrix allows you to customize how different types of data are rendered by providing a componentRegistry
prop in FabrixProvider
.
This prop enables you to define which React components should be used for various GraphQL types and fields, giving you the flexibility to tailor the UI components to fit your application’s needs.
Creating your own ComponentRegistry
The ComponentRegistry
supports two types of components:
-
Default Components: These are predefined components for common use cases such as fields, forms, and tables. You can provide default components that Fabrix will use if no custom components are specified.
-
Custom Components: These are user-defined components that you can register for specific GraphQL types. You can create a
ComponentRegistry
with custom components that match the types and purposes of your schema fields.
Here’s how you can define your custom component registry: