read-more
b-read-more = wrap
b-read-more-mode = chars or b-read-more-mode = rows
b-read-more-start = expanded is optional
--------------------
read-more-content
b-read-more = content
b-read-more-chars = # or b-read-more-rows = #
--------------------
read-more-text
--------------------
read-more-button and read-more-overlay
b-read-more = more-button or b-read-more = less-button
--------------------
read-more-additional-content
b-read-more = additional-content
Rows mode
Provides the smoothest transition when using both buttons (More and Less). This mode preserves punctuation when it appears as the final character before the ellipsis (…). Use when truncating text by number of visible lines.
Required attributes:
b-read-more-mode = rows on read-more
b-read-more-rows = 1–10 on read-more-content; minimum 1 and maximum 10 rows in collapsed state
The script automatically:
Characters mode
Provides the smoothest transition (0.2s-0.5s) when using a single button (More or Less). This mode hides punctuation when it appears as the final character before the ellipsis (…). Use when truncating text by character count.
Required attributes:
b-read-more-mode = chars on read-more
b-read-more-chars = # on read-more-content; replace # with the maximum number of characters to display in collapsed state
The script:
Start State (Optional)
By default, each Read More instance starts collapsed.
To make an instance start expanded, add the attribute b-read-more-start = expanded to read-more.
This works in both row and character modes.
Transitions & Animations (Important)
⚠️ This script does NOT define animation timing.
All animations are controlled entirely through the Styler.
Control the transition speed by adjusting the transition settings on read-more-content in the Style panel.
Disable animation (snap instead of animate):
0msThe script automatically:
No code edits required.
Buttons During Animation
While the text is expanding or collapsing:
Accessibility (ARIA)
The component includes accessibility best practices:
aria-expanded is updated automaticallyNo extra setup required.
Links Inside Text
All links inside b-read-more = content are automatically elevated with z-index: 1 to ensure:
Optional Interactive Elements (Buttons & Overlays)
This Read More system is fully modular.
Any element that uses a valid Read More button attribute acts as a trigger — including overlays placed on top of the text.
Overlays as click triggers
Overlays can act as interactive triggers in the same way as buttons.
To make an overlay clickable, just add a custom attribute: b-read-more = more-button or b-read-more = less-button
This allows users to:
All triggers behave identically.
Removing overlays
If you remove an overlay element:
Overlays are optional interaction enhancers, not required elements.
Removing the Less button (one-way expansion)
If you remove: b-read-more = less-button
Result:
Important Behavior Note
The script:
This means:
Additional Content
Use b-read-more = additional-content for any extra elements that should expand and collapse together with the Read More text.
height: 0.auto).height).If you remove the element or don’t need extra content, the Read More system continues to work normally.
Summary (Interaction Flexibility)
You are free to:
All Read More triggers are attribute-based — not element-type dependent.