React component for adding an ellipsis to the middle of a line of text.
npm install react-truncate-inside> React component for adding an ellipsis to the middle of a line of text.
>
> Inspired by pablosichert / react-truncate
---
``bash`
npm install react-truncate-inside
`jsx
import React from 'react';
import Truncate from 'react-truncate-inside';
export default function Demo() {
return
}
`
| Name | Type | Desc | Default |
| -------- | ---------- | ------------------------------------------------------------ | -------------------- |
| text | string | | |number
| width | | Width of the element | parentNode.width |number
| offset | | Position(from the end) of the ellipsis that shows in text | 8 |string
| ellipsis | | Ellipsis that is added into the text in case it is truncated | '...'` |
MIT License