Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

rmc-feedback

react-component372.9k2.0.0TypeScript support: included

:active pseudo-class with react for mobile

react, react-component, touch feeedback, rc-swipeout, active pseudo

readme

rmc-feedback


:active pseudo-class with react/preact for mobile

NPM version build status Test coverage

Installation

npm install --save rmc-feedback

Development

npm install
npm start

Example

Usage

import TouchFeedback from 'rmc-feedback';

<TouchFeedback activeClassName="acitve" activeStyle={{ color: 'red'}} disabled={false}>
  <div>click to active</div>
</TouchFeedback>

API

props

name description type default
disabled | boolean false
activeClassName className applied to child when active string
activeStyle style applied to child when active (set to false to disable click feedback) object -

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

rmc-feedback is released under the MIT license.

changelog

History

2.0.0

  • remove props like onTouchStart, onTouchMove, onTouchEnd, onTouchCancel,onMouseDown, onMouseUp, onMouseLeave from TouchFeedback
  • fix the problem that TouchFeedback component will cover the children's events

1.0.2

  • support activeStyle=false to disabled touchfeedback

0.0.1

init project