# angular-gallery

> Responsive gallery for Angular with touch screen support.

Latest version **1.0.2** (published 2020-07-10) · Apache License 2.0 license · 0 weekly downloads

## Install

```sh
npm install angular-gallery
pnpm add angular-gallery
yarn add angular-gallery
bun add angular-gallery
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-07-10 |
| First published | 2020-04-11 |
| Weekly downloads | 0 |
| License | Apache License 2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Nikita Drozhzhin |
| Maintainers | drozhzhin_n_e |
| Keywords | Angular, Angular 2, ngx, ng2, Gallery, Image gallery |

## Links

- npm: https://www.npmjs.com/package/angular-gallery
- Repository: https://github.com/ivylaboratory/angular-gallery
- Homepage: http://ivylab.space/gallery
- Issues: https://github.com/ivylaboratory/angular-gallery/issues
- npm.io page: https://npm.io/package/angular-gallery

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2020-07-10
- 1.0.1 — 2020-07-10
- 0.3.4 — 2020-04-20
- 0.0.1 — 2020-04-11

## README

# Gallery for Angular

Responsive gallery for Angular with touch screen support.

Live demo can be found on [home page](http://ivylab.space/gallery).

## Installation

Install the npm package.
```
npm i angular-gallery
```
Import module:
```ts
import {IvyGalleryModule} from 'angular-gallery';

@NgModule({
    imports: [IvyGalleryModule]
})
```

## Usage
Build your list of thumbnails and open them in full size using the gallery, passing the index of the image as an argument.

```ts
import {Gallery} from 'angular-gallery';

constructor(private gallery: Gallery) {}

showGallery(index: number) {
    let prop = {
        images: [
            {path: 'path_to_image_full_image'},
            ...
        ],
        index
    };
    this.gallery.load(prop);
}
```
```html
<img src="path_to_thumbnail" (click)="showGallery(index)">
```

## Properties

| name | type | default | description |
|------|------|---------|-------------|
| index | number | | The index of the image in the array that will be displayed when the gallery is opened. |
| minSwipeDistance | number | 50 | Minimum distance for swipe. |
| transitionDuration | number | 400 | Animation duration. |
| transitionTimingFunction | 'ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear' | 'ease' | Smooth animation function. |
| counter | boolean | false | Show counter. |
| counterSeparator | string | ' / ' | Counter separator. |
| arrows | boolean | true | Arrows for image navigation. |


## Browser support

IvyGallery supports the most recent two versions of all major browsers: Chrome (including Android 4.4-10), Firefox, Safari (including iOS 9-13), and Edge.

---
_Source: https://npm.io/package/angular-gallery · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
