npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

msc-line-clampin

v1.0.1

Published

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

Readme

msc-line-clampin

Published on webcomponents.org DeepScan grade

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

<msc-line-clampin />

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
<script
  type="module"
  src="https://unpkg.com/msc-line-clampin/mjs/wc-msc-line-clampin.js">        
</script>
  • Structure

Put <msc-line-clampin /> into HTML document.

<msc-line-clampin>
  TikTok 是一款玩轉音樂創作的短影音 App,更是年輕人的交友社群。
  在這裡每個人都可以拍出屬於自己的創意影片,
  跟著音樂的節奏,你可以盡情拍攝多種影片內容,
  個人才藝、生活紀錄、表演、舞蹈、劇情演繹等。
  點子有多狂,TikTok 舞台就有多大。
  趕快上傳影片,讓世界看見你的創意吧!
</msc-line-clampin>

JavaScript Instantiation

<msc-line-clampin /> could also use JavaScript to create DOM element. Here comes some examples.

<script type="module">
import { MscLineClampin } from 'https://unpkg.com/msc-line-clampin/mjs/wc-msc-line-clampin.js';

//use DOM api
const nodeA = document.createElement('msc-line-clampin');
const textA = document.createTextNode('write your text content here.');
document.body.appendChild(nodeA);
nodeA.appendChild(textA);

// new instance with Class
const nodeB = new MscLineClampin();
const textB = document.createTextNode('write your text content here.');
document.body.appendChild(nodeB);
nodeB.appendChild(textB);
</script>

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.

<style>
msc-line-clampin {
  --msc-line-clampin-line-clamp: 2;
  --msc-line-clampin-padding-size: 86px;
  --msc-line-clampin-button-text-color: rgba(52 120 246);
  --msc-line-clampin-button-text: 'more';
}
</style>

Event

| Event Signature | Description | | ----------- | ----------- | | msc-line-clampin-expand | Fired when <msc-line-clampin /> expanded. |

Reference