Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/afeiship/react-overflow-text
- Owner: afeiship
- Created: 2024-07-10T13:58:28.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-10T14:20:14.000Z (6 months ago)
- Last Synced: 2024-10-26T22:53:16.080Z (about 2 months ago)
- Topics: component, overflow, react, truncate, truncate-text
- Language: TypeScript
- Homepage: https://afeiship.github.io/react-overflow-text/
- Size: 152 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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