{"id":50766082,"url":"https://github.com/ayush-97techyboy/xdragndrop","last_synced_at":"2026-06-11T14:01:19.143Z","repository":{"id":352268356,"uuid":"1201440634","full_name":"Ayush-97techyboy/XDragNDrop","owner":"Ayush-97techyboy","description":"A responsive React Drag N Drop app using React \u0026 Vite","archived":false,"fork":false,"pushed_at":"2026-04-18T18:03:40.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-18T19:26:55.522Z","etag":null,"topics":["array-manipulations","html5-css3-javascript","react-hooks","reactjs-components","responsive-web-design","splice","vanilla-css","vitejs"],"latest_commit_sha":null,"homepage":"https://x-dragndrop.netlify.app/","language":"JavaScript","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/Ayush-97techyboy.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-04T17:22:19.000Z","updated_at":"2026-04-18T18:03:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Ayush-97techyboy/XDragNDrop","commit_stats":null,"previous_names":["ayush-97techyboy/xdragndrop"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Ayush-97techyboy/XDragNDrop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush-97techyboy%2FXDragNDrop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush-97techyboy%2FXDragNDrop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush-97techyboy%2FXDragNDrop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush-97techyboy%2FXDragNDrop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ayush-97techyboy","download_url":"https://codeload.github.com/Ayush-97techyboy/XDragNDrop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush-97techyboy%2FXDragNDrop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34201842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"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":["array-manipulations","html5-css3-javascript","react-hooks","reactjs-components","responsive-web-design","splice","vanilla-css","vitejs"],"created_at":"2026-06-11T14:01:05.984Z","updated_at":"2026-06-11T14:01:19.125Z","avatar_url":"https://github.com/Ayush-97techyboy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  XDragNDrop: The Art of Seamless Reordering\n\nWelcome to **XDragNDrop**, where numbers aren't just digits—they're interactive elements in a fluid, high-fidelity experience. This isn't your standard drag-and-drop; it's a meticulously crafted interface designed to feel alive, responsive, and tactile.\n\n## 🧠 The Magic Under the Hood (The Logic)\n\nCreating a smooth reordering experience requires more than just moving items. Here is how we made it feel so natural:\n\n### 1. The \"Shift\" Reordering Logic\nUnlike a simple swap, we use an **Array Splice Strategy**. When you drop an item:\n- We first \"pluck\" the dragged digit out of its original position.\n- We then \"inject\" it into the target slot.\n- All other digits automatically shift and fill the gaps, ensuring the list always stays in a perfect 0-9 flow without leaving empty holes.\n\n### 2. The \"X-Ray\" Interaction State\nTo give you total confidence during a move, we implemented a **Triple-State Visual Engine**:\n- **The Original Spot**: Leaves behind a green-dashed \"origin\" box so you remember where you started.\n- **The Ghost**: Your mouse carries a semi-transparent blue \"blueprint\" of the box.\n- **The Preview Overlay**: As you hover over a potential home, we show the *original occupant* (the target) sitting perfectly still, while your *new number* floats over it. This \"see-through\" layering ensures you always know exactly what you are replacing.\n\n### 3. Gap-Free Dragging\nStandard drag-and-drop often \"breaks\" when your mouse passes between boxes. We fixed this by adding a **Global Drag Listener** on the entire container, ensuring the interaction remains active even if your cursor is in the empty space between the slots.\n\n---\n\n## 🎨 Design Philosophy\n\n- **Human-Centric Spacing**: Every gap and margin has been manually tuned to feel \"compact but breathable.\" We believe a tight layout creates a more focused task environment.\n- **Typography with Character**: We chose **Outfit** for its clean geometric lines and **Archivo Black** for its heavy, dependable presence.\n- **Responsive at Heart**: Whether you're on a massive 4K monitor or a small smartphone, the grid intelligently adapts from 5 columns down to 2, keeping the boxes large enough for your fingers or mouse.\n\n---\n\n## 🛠️ Built With\n\n- **React \u0026 Vite**: For lightning-fast performance and crystal-clear code state.\n- **Vanilla CSS**: No bulky frameworks—just raw, high-performance styling that gives us pixel-perfect control over every shadow and border.\n\n## 🚀 Get Started\n\n1. **Install Dependencies**: `npm install`\n2. **Launch the Experience**: `npm run dev`\n3. **Build for the World**: `npm run build`\n\n---\n\n*Made with 💙 to redefine how we interact with simple data by \u003ca href=\"https://github.com/Ayush-97techyboy\" target=\"_blank\"\u003eAyush\u003c/a\u003e*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayush-97techyboy%2Fxdragndrop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayush-97techyboy%2Fxdragndrop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayush-97techyboy%2Fxdragndrop/lists"}