{"id":16788742,"url":"https://github.com/markmead/alpinejs-cursor","last_synced_at":"2025-04-10T23:25:23.028Z","repository":{"id":98518916,"uuid":"521755320","full_name":"markmead/alpinejs-cursor","owner":"markmead","description":"This is a tiny JavaScript package that creates custom cursor for you with minimal JavaScript and allows you to write hover effects for the cursor(s) in CSS 👆","archived":false,"fork":false,"pushed_at":"2025-03-07T13:49:02.000Z","size":32,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T20:12:40.177Z","etag":null,"topics":["alpine","alpinejs","cursor","custom-cursor","interactive"],"latest_commit_sha":null,"homepage":"","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/markmead.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-05T19:31:02.000Z","updated_at":"2025-03-07T13:49:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"53215bab-2713-480c-9bb1-d489160d43e4","html_url":"https://github.com/markmead/alpinejs-cursor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"markmead/alpinejs-plugin-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmead%2Falpinejs-cursor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmead%2Falpinejs-cursor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmead%2Falpinejs-cursor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmead%2Falpinejs-cursor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markmead","download_url":"https://codeload.github.com/markmead/alpinejs-cursor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248313680,"owners_count":21082897,"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","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":["alpine","alpinejs","cursor","custom-cursor","interactive"],"created_at":"2024-10-13T08:24:35.881Z","updated_at":"2025-04-10T23:25:23.020Z","avatar_url":"https://github.com/markmead.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alpine JS Cursor 👆\n\n![](https://img.shields.io/bundlephobia/min/alpinejs-cursor)\n![](https://img.shields.io/npm/v/alpinejs-cursor)\n![](https://img.shields.io/npm/dt/alpinejs-cursor)\n![](https://img.shields.io/github/license/markmead/alpinejs-cursor)\n\nThis is a tiny JavaScript package that creates custom cursor for you with\nminimal JavaScript and allows you to write hover effects for the cursor(s) in\nCSS.\n\n## Features\n\n- 🪶 Lightweight (\u003c 1kb minified)\n- 🎨 Fully customizable with CSS\n- ⚡ Simple API with minimal configuration\n- 🔄 Multiple cursor support for follow-along effects\n- 🎯 Target specific elements for custom hover states\n- 📱 Works with mouse and touch devices\n\nPerfect for creative websites, portfolios, and interactive experiences where you\nwant to replace the default cursor with something more engaging.\n\n## Install\n\n## CDN\n\nFor this package to work with a CDN, you'll need to access the `Cursor` class\nfrom the `window` object.\n\n```html\n\u003cscript\n  defer\n  src=\"https://unpkg.com/alpinejs-cursor@latest/dist/cdn.min.js\"\n\u003e\u003c/script\u003e\n\n\u003cscript defer src=\"https://unpkg.com/alpinejs@latest/dist/cdn.min.js\"\u003e\u003c/script\u003e\n```\n\n## Package\n\n```shell\nyarn add -D alpinejs-cursor\nnpm install -D alpinejs-cursor\n```\n\n```js\nimport Alpine from 'alpinejs'\nimport cursor from 'alpinejs-cursor'\n\nAlpine.plugin(cursor)\n\nAlpine.start()\n```\n\n## Usage\n\nAlpine JS Cursor is built upon\n[Custom Cursor](https://github.com/markmead/custom-cursor), a vanilla JavaScript\nlibrary for creating custom cursors. This Alpine.js wrapper provides the same\nfunctionality with Alpine's declarative syntax.\n\n## Basic Example\n\nTo create a simple custom cursor:\n\n```html\n\u003cbody x-data x-cursor\u003e\n  //\n\u003c/body\u003e\n```\n\n## Advanced Examples\n\n### Multiple Cursors\n\nCreate a trail effect with multiple cursors:\n\n```html\n\u003cbody x-data x-cursor.5\u003e\n  \u003c!-- Creates 5 cursor elements that follow in sequence --\u003e\n\u003c/body\u003e\n```\n\n### Custom Hover States\n\nDefine specific elements that will trigger cursor style changes:\n\n```html\n\u003cbody x-data x-cursor x-cursor-targets='[\"button\", \".link\", \"#hero\"]'\u003e\n  //\n\u003c/body\u003e\n```\n\n## Options\n\nAlpine JS Cursor maintains the same API as the original Custom Cursor plugin:\n\n| Custom Cursor Option | Alpine JS Implementation | Description                                     |\n| -------------------- | ------------------------ | ----------------------------------------------- |\n| `count`              | `x-cursor.5`             | Creates multiple cursor elements (trail effect) |\n| `targets`            | `x-cursor-targets`       | Elements that trigger hover states              |\n\nFor more advanced usage and options, refer to the\n[Custom Cursor documentation](https://github.com/markmead/custom-cursor).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkmead%2Falpinejs-cursor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkmead%2Falpinejs-cursor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkmead%2Falpinejs-cursor/lists"}