0.4.1 • Published 16 days ago

@re-dev/react-truncate v0.4.1

Weekly downloads
-
License
MIT
Repository
github
Last release
16 days ago

@re-dev/react-truncate

English | 简体中文

Provides Truncate, MiddleTruncate and ShowMore React components for truncating multi-line spans and adding an ellipsis.

Installation

With npm(or yarn, or pnpm):

npm install @re-dev/react-truncate

Documentation

A basic component for cropping text. Usually there is no need to use it directly. <ShowMore /> and <MiddleTruncate /> provided by this package are both extended based on this component.

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.

Release Notes

Please refer to CHANGELOG for details.

License

MIT License © 2023-PRESENT chengpeiquan

0.4.1

16 days ago

0.4.0

18 days ago

0.3.0

4 months ago

0.3.2

4 months ago

0.3.1

4 months ago

0.2.0

5 months ago

0.1.2

6 months ago

0.1.1

6 months ago

0.1.0

6 months ago