React Truncate String
Truncate strings like butter.
<img src="https://img.ziggi.org/5Rjsznl9.png" />
Features
It truncates long long long long...long long strings in the middle!
demo: https://albinotonnina.github.io/react-truncate-string
š ultra-blazingly-fastš ultra-light: 1.76 KB
Table of Contents
Install
yarn add react-truncate-string
Usage
Truncate in the middle of the string
import Truncate from 'react-truncate-string'
...
render(){
return <TruncateString text="your long string" />
}
Demos
https://albinotonnina.github.io/react-truncate-stringhttps://codesandbox.io/s/xvv9r5ozo
Maintainers
@albinotonninaContribute
PRs accepted.TODO
- truncate by words?
- min start and end characters option?
- change debounce time with option?