To create a 'More/Less' toggle button in Webflow that reveals or hides content within the same element (without adding new elements or text boxes), use built-in interactions and visibility settings.
1. Structure Your Elements
- Place the hidden content inside a div within your existing layout.
- Example:
- A main text block or content area.
- A div that includes the extra content you want to show/hide (start with it hidden).
- A toggle button that says “More” by default.
2. Set Initial State of the Hidden Content
- Select the hidden content div.
- Go to the Style panel, and set:
- Display: None (to hide it initially).
- Optional: Give this div a class (e.g.,
more-content
).
3. Create the Interaction to Toggle Visibility
- Select the toggle button.
- Go to the Interactions panel → Element Trigger → Mouse Click (Tap).
- Click + New Click Animation.
4. Add Two Steps: Show and Hide
- Set two click actions using Click 1 (first click) and Click 2 (second click).
- Click 1 (Show content):
- Add an action: Hide/Show ➝ Choose the
more-content
div ➝ Set to Display: Block or Flex. - Add another action: Text Change (if needed) ➝ Target the same button ➝ Change text to “Less”.
- Click 2 (Hide content):
- Add Hide/Show ➝ Same target ➝ Set to Display: None.
- Change button text back to “More”.
5. Optional: Add Height Animation
- If you want a smoother open/close effect:
- Instead of using Display None/Block, use Size (Height) in the animation.
- Set the initial height to 0px and animate it to auto or specific px.
Summary
Use Webflow Interactions to toggle the visibility of an existing content div by changing its display or height and conditionally updating the button text. No new elements or text boxes are needed.