An open API service indexing awesome lists of open source software.

https://github.com/hermanya/use-3d-effect

🃏React hook that adds the 3D tilt card effect to any component.
https://github.com/hermanya/use-3d-effect

Last synced: 4 months ago
JSON representation

🃏React hook that adds the 3D tilt card effect to any component.

Awesome Lists containing this project

README

          

# use-3d-effect

>

[![NPM](https://img.shields.io/npm/v/use-3d-effect.svg)](https://www.npmjs.com/package/use-3d-effect) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

![screencast](https://media.giphy.com/media/fLp5ARL1xMwa7XTYQ4/giphy.gif)

[Demo](https://hermanya.github.io/use-3d-effect)

## Install

```bash
npm install --save use-3d-effect
```

## Usage

```tsx
import * as React from 'react'
import { animated } from 'react-spring';
import { use3dEffect } from 'use-3d-effect';

const Example = () => {
const ref = React.useRef(null);
const {style, ...mouseHandlers} = use3dEffect(ref);

return (

Hover over me!

);
};
```

## License

MIT © [Hermanya](https://github.com/Hermanya)

---

This hook is created using [create-react-hook](https://github.com/hermanya/create-react-hook).