Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/afeiship/react-overflow-text

Overflow text for react.
https://github.com/afeiship/react-overflow-text

component overflow react truncate truncate-text

Last synced: 9 days ago
JSON representation

Overflow text for react.

Awesome Lists containing this project

README

        

# react-overflow-text
> Overflow text for react.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```shell
npm install -S @jswork/react-overflow-text
```

## usage
1. import css
```scss
@import "~@jswork/react-overflow-text/dist/style.css";

// or use sass
@import "~@jswork/react-overflow-text/dist/style.scss";
```
2. import js
```js
import ReactOverflowText from '@jswork/react-overflow-text';
import '@jswork/react-overflow-text/dist/style.scss';
import { useState } from 'react';

function App() {
const [v1, setV1] = useState(false);
const [v2, setV2] = useState(false);
return (



Build Time: {BUILD_TIME}

react-overflow-text




{JSON.stringify({ v1, v2 })}


V1


setV1(e)}>

道可道,非常道;名可名,非常名。


无名,天地之始,有名,万物之母。


故常无欲,以观其妙,常有欲,以观其徼。


此两者,同出而异名,同谓之玄,玄之又玄,众妙之门。





V2


setV2(e)}>

乾六画皆阳,纯阳刚健,当它静而不变之时,则专一而无他;当它动而变化之时,则直遂而不挠,所以广大的宇宙持此产生。





);
}

export default App;
```

## preview
- https://afeiship.github.io/react-overflow-text/

## license
Code released under [the MIT license](https://github.com/afeiship/react-overflow-text/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/react-overflow-text
[version-url]: https://npmjs.org/package/@jswork/react-overflow-text

[license-image]: https://img.shields.io/npm/l/@jswork/react-overflow-text
[license-url]: https://github.com/afeiship/react-overflow-text/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/react-overflow-text
[size-url]: https://github.com/afeiship/react-overflow-text/blob/master/dist/react-overflow-text.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/react-overflow-text
[download-url]: https://www.npmjs.com/package/@jswork/react-overflow-text