Skip to main content
To make your component interactive and add options on the sidebar of the Visual Builder for entering data, you need to add the relevant options in the Widget file of that component and make necessary modifications in the Component as well. To add a text box on the side bar of the Visual Builder, you need to include the following code in the Widget file.
Up next, you will need to pass this object as an attribute in the widget file, as demonstrated in the following example.
In the above example, you can see that the configObj is added to the attributes. This inclusion ensures that the text box will be rendered on the sidebar of the Visual Builder. You can then access the value of the text box in your component as a prop. Here’s an example of how you can add multiple options by passing them in the traitConfig array.
Next, let us guide you with how to add Custom Components Using Content Library.