Read More
Sixteen instances in the places a Read More usually goes: an article teaser, product copy, a specification table, a FAQ, team bios, reviews and release notes. Then a custom icon, a layout that collapses on phones only, a build log and a live event log for developers.
Article teaser with nested elements
Content source: Nested elements, with a heading, a paragraph, a list and a link in the content slot · Collapsed height: 10rem · Button style: Text only · Button alignment: Center · Read more text: Continue reading, with an accessible label
From the blog
Product description
Content source: Text, with line breaks · Collapsed height: 5lh, about five lines · the default outline button with a chevron
Studio headphones
Closed back, over ear, quiet enough for a train
Specification table
Content source: Nested elements, with a table · Collapsed height: 12rem · Initial state: Expanded · Button alignment: End · Read more text: Full specification · Read less text: Fewer details
Technical data
FAQ with Expand all and Collapse all
Four instances in a wrapper with an ID · Collapsed height: 3lh · Button style: Text only · Icon position: Before text · two plain buttons with data-ed-rm-action and data-ed-rm-target set to the wrapper, no script
Does the clipped text reach screen readers?
Can I show HTML from an ACF field?
What happens without JavaScript?
Does it work in Etch loops?
Team bios in cards
Three instances · Collapsed height: 4lh · Button style: Text only · Read more text: Full bio, with the person’s name in the accessible label · the third bio is short, so it gets no button
Maya Lindqvist
Lead developer
Daniel Okafor
Accessibility consultant
Ines Duarte
Designer
Reviews over a gradient
Collapsed height: 8rem · Fade start: 30% · the component takes the light text of the section, and its fade is a mask, so the gradient shows through with no color to set
What customers say
Three reviews, one preview
Release notes that open once
Allow collapsing again: No · Read more text: Show all changes · after the click the button is gone and keyboard focus moves to the list
Version 2.4
Your own icon and a filled button
Icon: Custom slot, with a plus SVG · Expanded icon rotation: 45, so the plus turns into a cross · Icon position: Before text · the pill shape and colors are styling variables on a wrapper class
Collapse on phones only
One styling variable in a media query sets --ed-read-more-collapsed-height to none from 640 px. Switch the frame to Mobile and the text collapses.
Venue
A hall built into an old tram depot
Build log in a code panel
Content source: Text, so every line break stays · Collapsed height: 8lh · Fade gradient: No · Button alignment: Stretch · the font, the dark panel and the button frame are styling variables
Events and deep links for developers
A link to an #id inside the clipped content expands it. A small page script prints every ed-read-more:toggle and ed-read-more:complete event with its reason.
End of the demo. Get the Read More component