JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 21516
  • Score
    100M100P100Q154675F
  • License MIT

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

Package Exports

  • @re-dev/react-truncate

Readme

@re-dev/react-truncate

GitHub stars

React component for truncating multi-line spans and adding an ellipsis.

Why?

This is a Fork version from react-truncate . Since the original version has not been maintained for a long time, we plan to solve existing problems through this repository.

Usage

With npm(or yarn, or pnpm):

npm install @re-dev/react-truncate

In .jsx / .tsx or other files:

import { Truncate, ShowMore } from '@re-dev/react-truncate'

Normally, you only need to use the ShowMore component.

See: Basic Example

Documentation

New documentation coming soon, please refer to the legacy version for now.

See:

Release Notes

Please refer to CHANGELOG for details.

Development Plan

Here are some recent development plans.

If you have good ideas and suggestions, you can provide feedback through issue.

See: Projects on GitHub .

License

MIT License © 2023-PRESENT chengpeiquan