Line Clampin
<msc-line-clampin />
is a common text render effect. Sometimes we like to hide text in a restrick area and provide a more
button to expand the whole content. This is exactly what <msc-line-clampin />
do.
Check the following paragraph. It has already clamp in 3 lines. Let's take a look what can <msc-line-clampin />
do ?
Basic Usage
<msc-line-clampin />
is a web component. All we need to do is put the required script into your HTML document. Then follow <msc-line-clampin />
's html structure and everything will be all set.
Required Script
Structure
Put <msc-line-clampin />
into HTML document.
JavaScript Instantiation
<msc-line-clampin />
could also use JavaScript to create DOM element. Here comes some examples.
Style Customization
<msc-line-clampin />
uses CSS variables to hook control panel's theme. That means developer could easy change it into the looks you like.
Event
Event Signature | Description |
---|---|
msc-line-clampin-expand
|
Fired when <msc-line-clampin /> expanded. |