# react-ink

> A React component for adding material design style ink.

Latest version **6.5.4** (published 2023-05-12) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.5.4 |
| Published | 2023-05-12 |
| First published | 2014-11-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 40 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 320 |
| Author | Viget Labs |
| Maintainers | viget |
| Keywords | react, material design |

## Links

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

## 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

- 6.5.4 (latest) — 2023-05-12
- 6.1.0-rc (beta) — 2017-01-05
- 6.5.3 — 2022-09-15
- 6.5.2 — 2022-09-02
- 6.5.1 — 2021-05-28
- 6.5.0 — 2021-05-27
- 6.4.0 — 2018-06-07
- 6.3.0 — 2018-05-29
- 6.2.0 — 2017-04-11
- 6.1.1 — 2017-03-08
- 6.1.0 — 2017-01-05
- 6.0.1 — 2016-12-12
- 6.0.0 — 2016-12-07
- 5.1.1 — 2016-05-20
- 5.1.0 — 2016-04-25
- … 26 more at https://npm.io/package/react-ink/versions

## README

# React Ink

[![CircleCI](https://img.shields.io/circleci/project/vigetlabs/react-ink.svg?maxAge=2592000)](https://circleci.com/gh/vigetlabs/react-ink)
[![npm](https://img.shields.io/npm/v/react-ink.svg?maxAge=2592000)](https://www.npmjs.com/package/react-ink)
[![npm](https://img.shields.io/npm/dm/react-ink.svg?maxAge=2592000)](https://www.npmjs.com/package/react-ink)

Add the Material Design ripple effect to React component.

![Ink Gif](http://cl.ly/image/1r36102z0M3r/ink.gif)

## Usage

Ink must be placed within another component with a position is not `static` (so `relative`, `fixed`, or `absolute`).

```js
import React from 'react'
import Ink from 'react-ink'

const InkeyButton () => {
  return (
    <button style={{ position: "relative" }}>
      <Ink />
    </button>
  )
}
```

There are several options available for how `<Ink />` renders, see the [`getDefaultProps()` declaration](https://github.com/vigetlabs/react-ink/blob/master/src/index.js#L33-L37), however descriptions follow:


## Configuration

```javascript
{
  background : true,      // When true, pressing the ink will cause the background to fill with the current color
  duration   : 1000,      // Duration of the full animation completion
  opacity    : 0.25,      // The opacity of the ink blob
  radius     : 150,       // The size of the effect, will not exceed bounds of containing element
  recenter   : true,      // When true, recenter will pull ink towards the center of the containing element
  style      : {...},     // See src/style.js. Any rules set here will extend these values
  hasTouch   : true|false // Override internal hasTouch detection
}
```


***

<a href="http://code.viget.com">
  <img src="http://code.viget.com/github-banner.png" alt="Code At Viget">
</a>

Visit [code.viget.com](http://code.viget.com) to see more projects from [Viget.](https://viget.com)

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