{"id":14862272,"url":"https://github.com/skutam/angular-drag-drop-layout","last_synced_at":"2025-09-18T15:31:00.181Z","repository":{"id":243211560,"uuid":"811619121","full_name":"skutam/angular-drag-drop-layout","owner":"skutam","description":"Angular Drag Drop Layout is a lightweight, dependency-free Angular library for creating highly customizable, responsive grid layouts with drag-and-drop functionality. Built with Angular 18 and utilizing Angular Signals, this library provides a seamless and optimized experience for building dynamic and interactive layouts.","archived":false,"fork":false,"pushed_at":"2024-12-07T23:24:35.000Z","size":658,"stargazers_count":3,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-08T00:20:02.338Z","etag":null,"topics":["angular","drag-and-drop","grid-layout","lightweight","resizable","responsive"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/skutam.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-06-07T00:50:48.000Z","updated_at":"2024-12-07T23:23:56.000Z","dependencies_parsed_at":"2024-08-23T23:48:42.558Z","dependency_job_id":"e300d8f3-3e59-4b1b-ab74-f2916569d3e3","html_url":"https://github.com/skutam/angular-drag-drop-layout","commit_stats":null,"previous_names":["skutam/angular-drag-drop-layout"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skutam%2Fangular-drag-drop-layout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skutam%2Fangular-drag-drop-layout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skutam%2Fangular-drag-drop-layout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skutam%2Fangular-drag-drop-layout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skutam","download_url":"https://codeload.github.com/skutam/angular-drag-drop-layout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233492558,"owners_count":18684353,"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":["angular","drag-and-drop","grid-layout","lightweight","resizable","responsive"],"created_at":"2024-09-19T20:01:33.537Z","updated_at":"2025-09-18T15:31:00.157Z","avatar_url":"https://github.com/skutam.png","language":"TypeScript","readme":"# Angular drag drop layout\n\n![NPM Downloads](https://img.shields.io/npm/dm/%40skutam%2Fdrag-drop-layout)\n![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/skutam/angular-drag-drop-layout)\n![GitHub Issues or Pull Requests](https://img.shields.io/github/issues-pr/skutam/angular-drag-drop-layout)\n![NPM License](https://img.shields.io/github/license/skutam/angular-grid-layout)\n\nAngular Drag Drop Layout is a lightweight, dependency-free Angular library for creating highly customizable,\nresponsive grid layouts with drag-and-drop functionality. Built with Angular 18 and utilizing Angular Signals,\nthis library provides a seamless and optimized experience for building dynamic and interactive layouts.\n\n### **[View Demo](https://skutam.github.io/angular-drag-drop-layout/)**\n\n## Features\n- **No External Dependencies**: Pure Angular solution with no additional dependencies.\n- **Optimized Performance**: Built with Angular 18 and Angular Signals for efficient change detection and rendering.\n- **Responsive Grid Layout**: Flexible CSS grid-based layout that adapts to various screen sizes.\n- **Draggable Items**: Easily move items within the grid or between multiple grids.\n- **Drag and Drop Between Grids**: Supports dragging items from one grid to another with ease.\n- **Custom Drag Handles**: Assign custom drag handles to control draggable areas within items.\n\n## Installation\n\n```bash\nnpm install @skutam/drag-drop-layout\n```\n\n## Usage\n\n1. Import the `DragDropLayoutModule` in your module.\n\n```typescript\nimport { DragDropLayoutModule } from '@skutam/drag-drop-layout';\n\n@NgModule({\n  declarations: [\n    AppComponent\n  ],\n  imports: [\n    DragDropLayoutModule\n  ],\n  providers: [],\n  bootstrap: [AppComponent]\n})\n\nexport class AppModule { }\n```\n\n2. Use the `ddl-grid` and `ddl-item` components in your template.\n\n```html\n\n\u003cdiv class=\"drag-items\" ddlDragItems [grids]=\"[grid]\"\u003e\n  \u003cdiv ddlDragItem\n       class=\"drag-item\"\n       [draggable]=\"true\"\n       [disabled]=\"i == 1\"\n       [width]=\"2\"\n       [height]=\"2\"\n       [dragData]=\"i\"\n       *ngFor=\"let dragItem of dragItems; let i = index\"\u003e{{dragItem}}\u003c/div\u003e\n\u003c/div\u003e\n\n\u003cddl-grid [columns]=\"columns\" #grid class=\"grid\"\n          [rows]=\"rows\"\n          [colGap]=\"colGap\"\n          [rowGap]=\"rowGap\"\n          (itemDropped)=\"itemDropped($event)\"\n          [(items)]=\"items\"\u003e\n  \u003cddl-item *ngFor=\"let item of items; trackBy: itemTrackBy\" [resizeTypes]=\"resizeTypes\"\u003e\n    \u003cdiv class=\"item-info\"\u003e{{item.id}} [{{item.x}},{{item.y}}] ({{item.width}},{{item.height}})\u003c/div\u003e\n    \u003cspan class=\"item-info-data\"\u003e{{item.data}}\u003c/span\u003e\n    \u003cdiv ddlDragHandle class=\"drag-handle\"\u003eHandle\u003c/div\u003e\n  \u003c/ddl-item\u003e\n\u003c/ddl-grid\u003e\n```\n\n3. Define the grid and items in your component.\n\n```typescript\nimport { Component } from '@angular/core';\nimport { Item, ResizeType, GridItemDroppedEvent } from '@skutam/drag-drop-layout';\n\n@Component({\n  selector: 'app-root',\n  templateUrl: './app.component.html',\n  styleUrls: ['./app.component.scss']\n})\nexport class AppComponent {\n  public columns = 12;\n  public rows: number = 4;\n  public colGap: number = 20;\n  public rowGap: number = 20;\n\n  public items: Item\u003cstring\u003e[] = [\n    new Item(null, 6, 2, 2, 2, 'Item 0 | TOP'),\n    new Item(null, 2, 2, 2, 1, 'Item 1 | TOP'),\n    new Item(null, 11, 3, 1, 2, 'Item 2 | TOP'),\n  ];\n\n  public resizeTypes: ResizeType[] = ['bottom-right', 'right', 'top-left', 'left', 'bottom-left', 'top', 'bottom', 'top-right'];\n  public dragItems: string[] = ['Item 1', 'Item 2', 'Item 3'];\n\n  public itemDropped(event: GridItemDroppedEvent): void {\n    this.items = event.item;\n  }\n\n  protected readonly itemTrackBy = itemTrackBy;\n  protected readonly RESIZE_TYPES: ResizeType[] = ['top-left', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left'];\n}\n```\n\n## Development\n\n1. Clone the repository\n\n```bash\ngit clone git@github.com:skutam/angular-drag-drop-layout.git\ncd angular-drag-drop-layout\n```\n\n2. Install the dependencies\n\n```bash\nnpm install\n```\n\n3. Start the watch mode for the library\n\n```bash\nnpm run watch:lib\n```\n\n4. Serve the demo application\n\n```bash\nnpm run serve:client\n```\n","funding_links":[],"categories":["Third Party Components"],"sub_categories":["Drag and Drop"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskutam%2Fangular-drag-drop-layout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskutam%2Fangular-drag-drop-layout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskutam%2Fangular-drag-drop-layout/lists"}