use-tilt3d
v1.0.1
Published
A smooth 3D tilt React library.
Readme
use-tilt3d
A smooth 3D tilt React library.
Installation
To install the package, use npm:
pnpm add use-tilt3d
yarn install use-tilt3d
npm install use-tilt3dUsage
import { useTilt3d } from 'use-tilt3d';
const ref = useTilt3d({
// ...
});
<div ref={ref} style={{ width: '200px', height: '200px', backgroundColor: 'lightgray' }}>
Tilt me!
</div>tsup
Bundle your TypeScript library with no config, powered by esbuild.
https://tsup.egoist.dev/
How to use this
- install dependencies
# pnpm
$ pnpm install
# yarn
$ yarn install
# npm
$ npm install- Add your code to
src - Add export statement to
src/index.ts - Test build command to build
src. Once the command works properly, you will seedistfolder.
# pnpm
$ pnpm run build
# yarn
$ yarn run build
# npm
$ npm run build- Publish your package
$ npm publishtest package
https://www.npmjs.com/package/use-tilt3d
