Skip to content
R

react-lines-ellipsis

Simple multiline ellipsis component for React.JS

by xiaodyFree

#345in UI Libraries
0In stores

Description

react-lines-ellipsis is a multiline ellipsis component for React. It clamps a block of text to a maximum number of lines and shows an ellips…

Highlights

  • Clamps text to a set number of lines
  • Custom ellipsis, trimming and letter or word splitting
  • Reflow callback and isClamped method
  • Responds to window resize and orientation change
  • Experimental HTML truncation

Ratings & Reviews

No ratings yet

Be the first to rate react-lines-ellipsis.

People also visit

R

react-text-truncate

Truncate text for React.js

UI Libraries
Launch
R

react-multiline-clamp

React component that uses the css line clamping

UI Libraries
Launch
R

react-truncate-inside

React component that truncates text in the middle with an ellipsis

UI Libraries
Launch
R

react-textfit

React component to fit headlines and paragraphs into any element

UI Libraries
Launch
R

react-truncate-string

> Truncate strings like butter

UI Libraries
Launch
F

@fawazahmed/react-native-read-more

A simple react native library

UI Libraries
Launch

react-lines-ellipsis FAQ

What does it do?

It is a multiline ellipsis component for React. It cuts text to a set number of lines and shows an ellipsis at the end.

How do I set the number of lines?

Use the maxLine prop. It accepts a number or a string, and the default is one line.

Does it work on the server?

No. The README says it does not clamp text on the server side or with JavaScript disabled.

Can it truncate HTML?

Only experimentally. Pass unsafeHTML instead of text, and use ellipsisHTML for a custom ellipsis, as the README describes.

What are its known limits?

It can be fooled by some styles, such as first-letter and ligatures, and it needs modern browsers.

What are the best react-lines-ellipsis alternatives?

Popular alternatives to react-lines-ellipsis include react-text-truncate, react-multiline-clamp and react-truncate-inside. See all react-lines-ellipsis alternatives

Developer Stuff

Badges