Learning the visual editor
Responsive design tricks
Saving layers as templates
Importing your site pages
Connecting custom data
Interactive pages with state and actions
Creating reusable components with Symbols
Targeting and scheduling content
Building custom forms
SEO optimizing Builder.io content
Creating custom models
Using custom fields
Enable on-site previewing and editing
Dynamic URLs and advanced data fetching
Adding Custom Code
Using 3rd party libraries
Extending Builder.io with plugins
Using your React components in Builder
Triggering custom actions
Ruby on rails
Learn how to make your Builder content interactive with state and actions in this 5 minute video!
Using state and actions
Were going to start by dragging and dropping in a template. Add two buttons below the template. One button will make the content disappear, and the other will make the content reappear.
Now you can click on the buttons and see our function working. On the left side of the editor, you can see hidden being toggled on and off when our buttons are clicked. Lastly, we need to bind our hidden property to our content so we can visually see our content disappear/reappear. Click on the content that you want to apply the hidden property to. At the top of the “Data” tab in the binding section, click "get" and select “hide if”. Then, click “from” and select “hidden”.
To learn more about how to add custom code to state bindings or action handlers, check out our Custom Code guide.