# react-clampio

> React component for clamping lines. It adds ellipsis if text exceeds the defined max lines value

Latest version **0.1.0** (published 2018-08-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-clampio
pnpm add react-clampio
yarn add react-clampio
bun add react-clampio
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-08-23 |
| First published | 2018-08-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alexey Vakulich |
| Maintainers | ok2ju |
| Keywords | react, clamp, ellipsis, text |

## Links

- npm: https://www.npmjs.com/package/react-clampio
- Repository: https://github.com/jszombies/react-clampio
- Homepage: https://github.com/jszombies/react-clampio#readme
- Issues: https://github.com/jszombies/react-clampio/issues
- npm.io page: https://npm.io/package/react-clampio

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2018-08-23

## README

# react-clampio
React component for clamping lines. It adds ellipsis if text exceeds the defined max lines value

# Getting started
Install package using `yarn` or `npm`
```
$ yarn add react-clampio
```

```
$ npm install react-clampio --save
```

Pass to the component text that should be truncated:
```js
import Clampio from 'react-clampio';

...

const longText = 'Lorem ipsum ...';
<Clampio
  text={longText}
  lines={3}
/>
```

# Props
| Name      | Type   | Required | Description                                           |
| --------- | ------ | -------- | ----------------------------------------------------- |
| text      | string | true     | Text to truncate                                      |
| lines     | number | false    | Maximum lines (default 2)                             |
| ellipsis  | string | fasle    | Symbol at the end of truncated text (default ...)     |
| className | string | false    | Custom classname                                      |

---
_Source: https://npm.io/package/react-clampio · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
