Skip to Content

Line Clamp


Line Clamp — is a js component to create expandable (“Show more…”) sections with html content.

View Source Code


Use the following wrapper around your html content:

<div class="line-clamp-[1..6]" data-mage-init='{"lineClamp":{}}'>

JS Usage

If you already have a wrapper around the content but you can’t modify it you can use js and css code:

$(document).on('breeze:load', () => {
.selector {