{"id":40949481,"url":"https://github.com/danivalls/react-tilt-3d","last_synced_at":"2026-01-22T05:09:31.094Z","repository":{"id":238876180,"uuid":"797819540","full_name":"danivalls/react-tilt-3d","owner":"danivalls","description":"A highly customizable react component to provide a 3d tilting effect that follows the cursor.","archived":false,"fork":false,"pushed_at":"2024-10-26T12:19:09.000Z","size":9044,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-23T18:41:05.227Z","etag":null,"topics":["javascript-library","react","react-component","react-component-library","react-components","react-library","react-ui","ts","typed","ui","ui-component","ui-components"],"latest_commit_sha":null,"homepage":"https://danivalls.github.io/react-tilt-3d/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danivalls.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-08T15:22:47.000Z","updated_at":"2025-02-08T20:59:52.000Z","dependencies_parsed_at":"2024-05-12T16:25:15.919Z","dependency_job_id":"26607355-d2f9-46b1-9701-cfd8a9f3b65f","html_url":"https://github.com/danivalls/react-tilt-3d","commit_stats":null,"previous_names":["danivalls/react-tilt-3d"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/danivalls/react-tilt-3d","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danivalls%2Freact-tilt-3d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danivalls%2Freact-tilt-3d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danivalls%2Freact-tilt-3d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danivalls%2Freact-tilt-3d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danivalls","download_url":"https://codeload.github.com/danivalls/react-tilt-3d/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danivalls%2Freact-tilt-3d/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28655242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript-library","react","react-component","react-component-library","react-components","react-library","react-ui","ts","typed","ui","ui-component","ui-components"],"created_at":"2026-01-22T05:09:30.383Z","updated_at":"2026-01-22T05:09:31.090Z","avatar_url":"https://github.com/danivalls.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-tilt-3d\n\n![React](https://img.shields.io/badge/react-%2320232a.svg?style=for-the-badge\u0026logo=react\u0026logoColor=%2361DAFB)![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)![NPM](https://img.shields.io/badge/NPM-%23CB3837.svg?style=for-the-badge\u0026logo=npm\u0026logoColor=white) [![try me!](https://img.shields.io/badge/try%20me!-DEMO%20PAGE%20%F0%9F%9A%80-green?labelColor=white\u0026style=for-the-badge\u0026link=https://danivalls.github.io/react-tilt-3d/)](https://danivalls.github.io/react-tilt-3d/)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/danivalls/react-tilt-3d/master/assets/demogif.gif?raw=true\" /\u003e\n\u003c/p\u003e\n  \u003cp align=\"center\"\u003e\n  \u003ci style=\"font-size: 8px; text-align:center; width: 100%; display: inline-block;\"\u003e(Image card in example is a creation from \u003ca href=\"https://www.reddit.com/r/mpcproxies/comments/ydtuxu/hello_everyone_i_just_made_a_complete_fully_dark/\"\u003e@mpcproxies\u003c/a\u003e user on reddit)\u003c/i\u003e\n\u003c/p\u003e\n\n### 🚀 Features\n\n- Highly customizable component via props:\n  - Scale when tilting\n  - Stop tilting when cursor leaves window\n  - Stop tilting when cursor distance from object exceeds limit\n  - Stop tilting when cursor hovers the object\n  - Tilt in all axis or only in one (x or y)\n  - Customize how much you want it to tilt\n  - Customize the action radius\n  - Customize the transition timing function\n- Events onTiltStart, onTiltEnd, and onTiltChange\n- Compatible with touch devices\n- Can use device gyroscope to apply tilting (if device has gyroscope)\n- Apply the tilt effect to anything used as children.\n- Applies a lighting effect to reinforce the 3d-effect.\n- Strongly typed\n- Experiment as much as you want with the [demo page](https://danivalls.github.io/react-tilt-3d/)\n\n### 📦 Installation\n\n`npm i react-tilt-3d`\u003cbr/\u003e\n`yarn add react-tilt-3d`\n\n### ✨ Usage\n\nJust wrap your content with Tilt3D:\n\n```jsx\nimport { Tilt3D } from 'react-tilt-3d';\n\nconst MyComponent = () =\u003e {\n  return (\n    \u003cTilt3D\u003e\n      \u003cSomeOtherComponent /\u003e\n    \u003c/Tilt3D\u003e\n  );\n};\n```\n\n### 🛠️ Customization\n\nSeveral customizations can be made via props:\n\n| prop                     | type                               | description                                                                                                                                                                                                                                                                                         | required | default    |\n| ------------------------ | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ---------- |\n| `maxTilt`                | `number`                           | Maximum amount of degrees the element will tilt                                                                                                                                                                                                                                                     | `false`  | `25`       |\n| `resetTiltOnOutOfBounds` | `boolean`                          | Determines if the tilt should reset to `0` if the cursor or pointer exceeds a distance from the element                                                                                                                                                                                             | `false`  | `false`    |\n| `resetTiltOnHover`       | `boolean`                          | Determines if the tilt should reset to `0` if the cursor or pointer hover the element. (Note that if actionOffset is `0` and resetTiltOnHover is set to true, no tilt will be ever show)                                                                                                            | `false`  | `false`    |\n| `actionOffset`           | `number`                           | Distance away from the center in which the tilt will be maxTilt.                                                                                                                                                                                                                                    | `false`  | `0`        |\n| `zoomOnTilt`             | `boolean`                          | If true, the element will scale when it is tilting                                                                                                                                                                                                                                                  | `false`  | `false`    |\n| `zoomScale`              | `number`                           | Amount of scaling the element will do with zoomOnTilt. (Recommended values between 1 and 1.5)                                                                                                                                                                                                       | `false`  | `1.25`     |\n| `lockAxisX`              | `boolean`                          | If true, the element will not tilt in the X axis.                                                                                                                                                                                                                                                   | `false`  | `false`    |\n| `lockAxisY`              | `boolean`                          | If true, the element will not tilt in the Y axis.                                                                                                                                                                                                                                                   | `false`  | `false`    |\n| `transition`             | `string`                           | Transition timing function to apply to the movement. Specially visible when the tilt resets to 0,0                                                                                                                                                                                                  | `false`  | `ease-out` |\n| `enableLighting`         | `boolean`                          | Enables the lighting effect applied when tilt changes on Y axis                                                                                                                                                                                                                                     | `false`  | `true`     |\n| `enableGyro`             | `boolean`                          | If the device has gyroscope, this will apply the tilt effect when the device is phisically tilted. Have in mind that gyro mode will ignore other configuration parameters like `resetTiltOnHover`, `resetTiltOnOutOfBounds`, `actionOffset`, `zoomOnTilt`, `zoomScale`, `lockAxisX` and `lockAxisY` | `false`  | `false`    |\n| `onTiltChange`           | `({x: number, y: number}) =\u003e void` | Callback to be executed every time the tilt changes.                                                                                                                                                                                                                                                | `false`  |            |\n| `onTiltStart`            | `() =\u003e void`                       | Callback to be executed every time the tilt starts                                                                                                                                                                                                                                                  | `false`  |            |\n| `onTiltEnd`              | `() =\u003e void`                       | Callback to be executed every time the tilt ends and returns to 0                                                                                                                                                                                                                                   | `false`  |            |\n| `className`              | `string`                           | classname to apply to the wrapper                                                                                                                                                                                                                                                                   | `false`  |            |\n| `children`               | `ReactNode`                        | The content to apply the tilt.                                                                                                                                                                                                                                                                      | `false`  |            |\n\n### About gyro mode\n\nBy passing the prop `enableGyro` the tilting effect can be applied by reading directly from the device sensors. While this can work out-of-the box for some devices, others (iOS) may require to explicitly request for permissions.\n\nYou can either do it manually (request permissions for `DeviceOrientationEvent`) or you can use the function `requestGyroPermission` exported by this library.\n\n`import { requestGyroPermission } from 'react-tilt-3d`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanivalls%2Freact-tilt-3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanivalls%2Freact-tilt-3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanivalls%2Freact-tilt-3d/lists"}