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.
- Host: GitHub
- URL: https://github.com/hermanya/use-3d-effect
- Owner: Hermanya
- Created: 2019-03-11T21:57:38.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-10-06T13:17:29.000Z (over 3 years ago)
- Last Synced: 2025-03-18T15:46:21.230Z (over 1 year ago)
- Language: TypeScript
- Homepage: https://hermanya.github.io/use-3d-effect
- Size: 2.43 MB
- Stars: 35
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# use-3d-effect
>
[](https://www.npmjs.com/package/use-3d-effect) [](https://standardjs.com)

[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).