react-text-truncate
Version:
Truncate text for React.js
39 lines (26 loc) • 908 B
Markdown
```
npm install react-text-truncate
```
```js
import TextTruncate from 'react-text-truncate'; // recommend
var TextTruncate = require('react-text-truncate'); // CommonJS or UMD
```
```jsx
<TextTruncate
line={1}
element="span"
truncateText="…"
text="Lorem Ipsum is simply dummy text of the printing and typesetting industry."
textTruncateChild={<a href="#">Read on</a>}
/>
```
[](http://shinychang.github.io/React-Text-Truncate/)
1. Why TextTruncate not shown after display changed?
You must trigger update manually.
2. Will TextTruncate support IE10 or below?
No! IE 10 and below are dead according to [Microsoft post](https://www.microsoft.com/en-us/WindowsForBusiness/End-of-IE-support).