{"id":19058850,"url":"https://github.com/zolcsi/ngx-simple-gallery","last_synced_at":"2025-04-18T00:32:40.457Z","repository":{"id":259477471,"uuid":"863008997","full_name":"zolcsi/ngx-simple-gallery","owner":"zolcsi","description":"Simple Gallery Angular Library","archived":false,"fork":false,"pushed_at":"2024-11-08T12:59:23.000Z","size":20835,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-08T13:19:53.228Z","etag":null,"topics":["angular","gallery","gallery-images","image-viewer"],"latest_commit_sha":null,"homepage":"https://zolcsi.github.io/ngx-simple-gallery/","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/zolcsi.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":"2024-09-25T15:01:31.000Z","updated_at":"2024-11-08T13:17:38.000Z","dependencies_parsed_at":"2024-10-26T04:10:51.685Z","dependency_job_id":null,"html_url":"https://github.com/zolcsi/ngx-simple-gallery","commit_stats":null,"previous_names":["zolcsi/ngx-simple-gallery"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zolcsi%2Fngx-simple-gallery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zolcsi%2Fngx-simple-gallery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zolcsi%2Fngx-simple-gallery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zolcsi%2Fngx-simple-gallery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zolcsi","download_url":"https://codeload.github.com/zolcsi/ngx-simple-gallery/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223768716,"owners_count":17199394,"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","gallery","gallery-images","image-viewer"],"created_at":"2024-11-09T00:01:33.389Z","updated_at":"2025-04-18T00:32:40.438Z","avatar_url":"https://github.com/zolcsi.png","language":"TypeScript","funding_links":[],"categories":["Third Party Components"],"sub_categories":["Carousels"],"readme":"# Ngx Simple Gallery\n\n[![npm version](https://badge.fury.io/js/ngx-simple-gallery.svg)](https://badge.fury.io/js/ngx-simple-gallery)\n[![codecov](https://codecov.io/gh/zolcsi/ngx-simple-gallery/graph/badge.svg?token=772F41V3M1)](https://codecov.io/gh/zolcsi/ngx-simple-gallery)\n\nA simple gallery lib for Angular [19]. It displays all the images as thumbnails and makes it big, when clicked/tapped on it.\n - mobile friendly\n - lightweight\n - use images from any source\n - two main forms of use: component selector or directive\n - navigate forwards/backwards with keyboard arrows or touch/click on arrows in the showcase dialog\n - loading spinner while loading\n - smooth animation of the next item\n - you can define a thumbnail or leave it empty. It is recommended to provide it though, because of performance reasons.\n\n### [**Demo**](https://zolcsi.github.io/ngx-simple-gallery/) | [**Changelog**](https://github.com/zolcsi/ngx-simple-gallery/blob/main/CHANGELOG.md)\n\n\n## Versioning\n\n| Gallery | Angular | Readme                                                                             |\n|---------|---------|------------------------------------------------------------------------------------|\n| `^19`   | `19+`   | here                                                                               |\n| `^18`   | `18`    | [**Readme.md**](https://github.com/zolcsi/ngx-simple-gallery/blob/1.2.4/README.md) |\n\n\n## Installation\n\n```sh\nnpm install --save ngx-simple-gallery @angular/cdk\n```\nadd the following line to your global styles (by default \"styles.(scss|css)\") if it is not included yet: \n```\n@import '@angular/cdk/overlay-prebuilt.css';\n```\n\n## Usage\n\n### 1. Import the gallery into your component\n\n```ts\nimport { NgxSimpleGalleryComponent } from '@zolcsi/ngx-simple-gallery';\n\n@Component({\n  standalone: true,\n  imports: [NgxSimpleGalleryComponent],\n})\nexport class AppComponent {}\n```\n\n### 2. Add the gallery items\n\n```js\nimport { GalleryItem } from '@zolcsi/ngx-simple-gallery';\n\n@Component({...})\nexport class AppComponent {\n  \n  galleryItems: GalleryItem[] = [\n    { \n      src: '/img/image1.jpg' \n    }, \n    {\n      src: 'https://picsum.photos/id/237/2000/3000',\n      thumbnail: 'https://picsum.photos/id/237/160/160',\n  }]\n}\n```\n\n### 3. You may configure the gallery with custom settings (optional)\n\n```js\nimport { GalleryItem } from '@zolcsi/ngx-simple-gallery';\n\n@Component({...})\nexport class AppComponent {\n  \n  galleryItems: GalleryItem[] = [...];\n  \n  galleryConfig: GalleryConfig = {\n    emptyMessage: 'No images found in the galleryItems',\n    galleryThumbnailSize: 140,\n    modalStartIndex: 2,\n    showModalThumbnailList: false\n  }\n}\n```\n\n### 4. Render the gallery with the items assembled previously (2 ways)\n\n#### 4a. Using the component selector (this renders the images on the page)\n```html\n\u003cngx-simple-gallery [galleryItems]=\"galleryItems\" [galleryConfig]=\"galleryConfig\"\u003e\u003c/ngx-simple-gallery\u003e\n```\nor\n\n#### 4b. Using the directive on your own element (this does not render the items on the page, directly opens the modal view)\n```html\n\u003cp simpleGallery [galleryItems]=\"galleryItems\" [galleryConfig]=\"galleryConfig\"\u003eMy Gallery\u003c/p\u003e\n```\n\n\n## Input parameters\n\n| Name           | Required | Type          | Default | Description                          |                              \n|----------------|----------|---------------|---------|--------------------------------------|\n| galleryItems   | yes      | GalleryItem[] | [ ]     | Contains the list of images          |\n| galleryConfig  | no       | GalleryConfig |         | Custom configuration for the gallery |\n\n\n### GalleryItem (represents one single image)\n\n| Name      | Required | Type    | Default | Description                                                      |                              \n|-----------|----------|---------|---------|------------------------------------------------------------------|\n| src       | yes      | string  | -       | Source of the image                                              |\n| thumbnail | no       | string  | src     | Thumbnail of the image. If not provided, the source will be used |\n\n\n### GalleryConfig (custom configuration for the gallery)\n\n| Name                   | Required | Type    | Default                              | Description                                                                     | Applicable           |                            \n|------------------------|----------|---------|--------------------------------------|---------------------------------------------------------------------------------|----------------------|\n| emptyMessage           | no       | string  | 'Empty gallery, no images provided.' | Message to show in case empty items provided                                    | component, directive |\n| galleryThumbnailSize   | no       | number  | 160                                  | The width/height of the thumbnails in px in the gallery (not in the modal view) | component            |\n| modalStartIndex        | no       | number  | 0                                    | The index of the first image to show in the modal view                          | directive            |\n| showModalThumbnailList | no       | boolean | true                                 | Whether to show the thumbnail list in the modal view                            | component, directive |                                     \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzolcsi%2Fngx-simple-gallery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzolcsi%2Fngx-simple-gallery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzolcsi%2Fngx-simple-gallery/lists"}