{"id":17036046,"url":"https://github.com/phucbm/cursor-effects","last_synced_at":"2025-10-06T21:56:48.735Z","repository":{"id":46206715,"uuid":"380386854","full_name":"phucbm/cursor-effects","owner":"phucbm","description":"A series of cursor effects.","archived":false,"fork":false,"pushed_at":"2025-06-26T09:50:20.000Z","size":3982,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-22T18:57:52.937Z","etag":null,"topics":["cursor","effects","frontend","gsap","javascript","jquery","mouse","mousemove"],"latest_commit_sha":null,"homepage":"https://phucbm.github.io/cursor-effects","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phucbm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-26T01:12:02.000Z","updated_at":"2025-08-03T16:34:16.000Z","dependencies_parsed_at":"2022-09-07T05:50:22.661Z","dependency_job_id":null,"html_url":"https://github.com/phucbm/cursor-effects","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/phucbm/cursor-effects","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phucbm%2Fcursor-effects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phucbm%2Fcursor-effects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phucbm%2Fcursor-effects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phucbm%2Fcursor-effects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phucbm","download_url":"https://codeload.github.com/phucbm/cursor-effects/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phucbm%2Fcursor-effects/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278686633,"owners_count":26028325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"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":["cursor","effects","frontend","gsap","javascript","jquery","mouse","mousemove"],"created_at":"2024-10-14T08:49:00.973Z","updated_at":"2025-10-06T21:56:48.728Z","avatar_url":"https://github.com/phucbm.png","language":"JavaScript","readme":"# [Cursor Effects](https://phucbm.github.io/cursor-effects/)\n\n[![github stars](https://badgen.net/github/stars/phucbm/cursor-effects?icon=github)](https://github.com/phucbm/cursor-effects/)\n[![github license](https://badgen.net/github/license/phucbm/cursor-effects?icon=github)](https://github.com/phucbm/cursor-effects/blob/main/LICENSE)\n[![Made in Vietnam](https://raw.githubusercontent.com/webuild-community/badge/master/svg/made.svg)](https://webuild.community)\n\nIn this repository, you will find a several interesting effects which interact with mouse cursor.\n\nEach effect has a demo, and the source code is open to use for everyone.\n\n## Mouse Follower\n\n![Mouse Follower](assets/images/mouse-follower-demo.gif \"Mouse Follower\")\n\nThis effect is rather simple. We will update an element's position based on the mouse's coordinates on the screen.\n\nSee demo at [/mouse-follower](https://phucbm.github.io/cursor-effects/mouse-follower) or check\nthe [source code](https://github.com/phucbm/cursor-effects/tree/main/mouse-follower)\n\n## Magnetic Button\n\n![Magnetic Button](assets/images/magnetic-button-demo.gif \"Magnetic Button\")\n\nWe will need a bit more of mathematics to get to know the way this effect works. See the chart below:\n\n![Chart](assets/images/magnetic-button-chart.jpeg \"Magnetic Button Chart\")\n\nWe will create a virtual area around the element, whenever the mouse get into that area, the element will stick with the\nmouse. To know when the mouse is designated zone, we will use a simple formula that we've learned from high school.\n\n```js\nOA = sqrt(pow(x, 2) + pow(y, 2));\n```\n\nSee demo at [/magnetic-button](https://phucbm.github.io/cursor-effects/magnetic-button) or check\nthe [source code](https://github.com/phucbm/cursor-effects/tree/main/magnetic-button)\n\n## Custom Cursor\n\n![Custom Cursor](assets/images/custom-cursor-demo.gif \"Custom Cursor\")\n\nThis one is the most complex one in the series. The original code was from OsuBlake, you can check it out\non [CodePen](https://codepen.io/osublake/pen/3170174f4ce844f78c7789a279f8e50e). I've created a plugin-like function so\nthat we can reuse it anywhere. Go check the options table below:\n\n|Option|Type|Default|Description|\n|---|---|---|---|\n|`targetClass`|`string`|'custom-cursor'|Create element with this class.|\n|`wrapper`|`jQuery`|$('body')|Cursor will be appended to this element.|\n|`speed`|`number`|.1|1 for fast, 0 for slow.|\n|`movingDelay`|`number`|300|Stop turns true after delay of milliseconds.|\n|`hasHover`|`boolean`|false|Turn on hover events.|\n|`hoverTarget`|`jQuery`|$('a[href], button')|Elements that able to be hovered.|\n|`touchDevices`|`boolean`|false|Show custom cursor on touch devices.|\n\nSee demo at [/custom-cursor](https://phucbm.github.io/cursor-effects/custom-cursor) or check\nthe [source code](https://github.com/phucbm/cursor-effects/tree/main/custom-cursor)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphucbm%2Fcursor-effects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphucbm%2Fcursor-effects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphucbm%2Fcursor-effects/lists"}