Webflow sync, pageviews & more.
NEW

How can I use Webflow to create a 'more/less' button that expands a div to show hidden content without creating a new element or text box?

TL;DR
  • Place extra content in a hidden div and add a toggle button labeled “More”.
  • Use Webflow Interactions on the button to show/hide the div and switch the button text between “More” and “Less”.
  • Optionally animate height instead of using display for a smoother transition.

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 panelElement TriggerMouse 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.

Rate this answer

Other Webflow Questions