1.3.0 • Published 4 years ago

@clampy-js/react-clampy v1.3.0

Weekly downloads
31
License
MIT
Repository
github
Last release
4 years ago

@clampy-js/react-clampy

React component that clamps the content of an element by adding an ellipsis to it if the content inside is too long.

Build Status GitHub issues GitHub license npm

It uses @clampy-js/clampy library (a fork of Clamp.js) behind the scene to apply the ellipsis.

It automatically re-clamps itself when the element or the browser window change size.

Install

npm install --save @clampy-js/react-clampy

Usage

import React, { Component } from 'react'

import Clampy from '@clampy-js/react-clampy'

class Clampy extends Component {
  render () {
    return (
      <Clampy clampSize="2">My long text to clamp</Clampy>
    )
  }
}

License

MIT © alexandremoore

1.3.0

4 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago