Socket
Socket
Sign inDemoInstall

@tailwindcss/line-clamp

Package Overview
Dependencies
Maintainers
4
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tailwindcss/line-clamp

A plugin that provides utilities for visually truncating text after a fixed number of lines.


Version published
Weekly downloads
412K
decreased by-1.24%
Maintainers
4
Weekly downloads
 
Created

What is @tailwindcss/line-clamp?

@tailwindcss/line-clamp is a Tailwind CSS plugin that provides utilities for visually truncating text after a fixed number of lines. This is particularly useful for creating clean and consistent layouts where text content needs to be limited to a certain number of lines.

What are @tailwindcss/line-clamp's main functionalities?

Basic Line Clamping

This feature allows you to truncate text after a specified number of lines. In this example, the text will be truncated after 3 lines.

<div class="line-clamp-3">
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</div>

Responsive Line Clamping

This feature allows you to apply different line clamping rules at different breakpoints. In this example, the text will be truncated after 2 lines on small screens, 4 lines on medium screens, and 6 lines on large screens.

<div class="line-clamp-2 md:line-clamp-4 lg:line-clamp-6">
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</div>

Other packages similar to @tailwindcss/line-clamp

FAQs

Package last updated on 12 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc