Provides `Truncate`, `MiddleTruncate` and `ShowMore` React components for truncating multi-line spans and adding an ellipsis.
npm install @re-dev/react-truncate

Provides Truncate, MiddleTruncate and ShowMore React components for truncating multi-line spans and adding an ellipsis.
With npm(or yarn, or pnpm):
``bash`
npm install @re-dev/react-truncate
- Truncate
A basic component for cropping text. Usually there is no need to use it directly. and
- ShowMore
A "Show More" component, when the content exceeds the set number of display lines, an expand button will appear to view more content.
A "middle ellipsis" component, when the content exceeds the limit of the parent's width, an ellipsis symbol will appear (similar to CSS's text-overflow: ellipsis effect), but its omission position can be specified in the middle of the text instead of the end.
Please refer to CHANGELOG for details.
MIT License © 2023-PRESENT chengpeiquan