Create a component
To create a custom component for Uiflow, you must update the code in the
index.tsx
file. Uiflow custom components are based on React.Note: An alternative to manually creating a custom component as described below, is to generate a custom component using AI.
To create a new component:
- 1.Open a command line window.
- 2.Navigate to your
components
directory:cd <path-to-custom-components-directory>/components - 3.Create a
MyComponent
directory and generate anindex.tsx
file for your component:mkdir MyComponentcd MyComponenttouch index.tsxNote: This walkthrough usesMyComponent
as a sample name for the custom component directory, but you can name the folder as you see fit. - 4.In a text/code editor, open the
index.tsx
file. - 5.Add your custom component code to the
index.tsx
file. - 6.Save your
index.tsx
file.
Note: To find preconfigured custom components for your application, see Uiflow's custom component repository.