rm-image-slider 20.0.0 → 21.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-26 Rajat
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -6,12 +6,28 @@
6
6
  [![npm](https://img.shields.io/npm/v/ngx-bar-rating.svg)](https://www.npmjs.com/package/rm-image-slider)
7
7
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/malikrajat/rm-image-slider)
8
8
 
9
+
9
10
  # Angular Image Slider with Lightbox
10
11
 
11
12
  An Angular responsive image slider with lightbox popup.
12
13
  Also support youtube and mp4 video urls. It is leazy loading and heigly optimized with standalone component.
13
14
 
14
15
 
16
+ ## 🎬 Demo in Action
17
+
18
+ <div align="center">
19
+
20
+ ![rm-image-slider Demo](https://github.com/malikrajat/rm-image-slider/blob/main/assets/rm-image-slider-demo.gif)
21
+
22
+ *Experience the power: Image carousel, lightbox popup, video support, and touch gestures - all in one lightweight component!*
23
+
24
+ </div>
25
+
26
+ > **✨ What you're seeing:** Smooth transitions, responsive touch controls, lightbox with keyboard navigation, video playback support, and customizable styling - everything working seamlessly together.
27
+
28
+
29
+
30
+
15
31
  ## Features!
16
32
 
17
33
  - Responsive (support images width and height in both % and px)
@@ -22,6 +38,34 @@ Also support youtube and mp4 video urls. It is leazy loading and heigly optimize
22
38
  - Support Images (jpeg, jpg, gif, png and Base64-String), Youtube url and MP4 video (url and Base64-String)
23
39
  - Handling runtime image arraylist changes
24
40
 
41
+
42
+ <div align="left">
43
+
44
+ ## 🚀 Live Demo & Examples
45
+
46
+ ### Try it out now! See all features in action 👇
47
+
48
+ <table>
49
+ <tr>
50
+ <td align="">
51
+ <a href="https://stackblitz.com/edit/stackblitz-starters-3kmpe6u9" target="_blank">
52
+ <img src="https://img.shields.io/badge/⚡_StackBlitz-1976D2?style=for-the-badge&logo=stackblitz&logoColor=white" alt="StackBlitz"/>
53
+ </a>
54
+ </td>
55
+ </tr>
56
+ </table>
57
+
58
+ ### 🎯 What you'll see:
59
+ • **Image Carousel** with smooth transitions
60
+ • **Lightbox Popup** with keyboard navigation
61
+ • **Video Support** (YouTube & MP4)
62
+ • **Mobile Responsive** touch/swipe gestures
63
+ • **Customization Options** - size, speed, autoplay
64
+
65
+ </div>
66
+
67
+ ---
68
+
25
69
  # Installation
26
70
 
27
71
  Install rm-image-slider with npm amd yarn
@@ -61,19 +105,19 @@ import { RmImageSliderComponent, ImageObject } from 'rm-image-slider';
61
105
 
62
106
  ```js
63
107
  imageObject: Array<ImageObject> = [{
64
- image: 'assets/img/slider/1.jpg',
65
- thumbImage: 'assets/img/slider/1_min.jpeg',
66
- alt: 'alt of image',
67
- title: 'title of image',
68
- index: 1
69
- }, {
70
- image: '.../iOe/xHHf4nf8AE75h3j1x64ZmZ//Z==', // Support base64 image
71
- thumbImage: '.../iOe/xHHf4nf8AE75h3j1x64ZmZ//Z==', // Support base64 image
72
- title: 'Image title', //Optional: You can use this key if want to show image with title
73
- alt: 'Image alt', //Optional: You can use this key if want to show image with alt
74
- order: 1, //Optional: if you pass this key then slider images will be arrange according @input: slideOrderType
75
- index: 2
76
- }
108
+ image: 'assets/img/slider/1.jpg',
109
+ thumbImage: 'assets/img/slider/1_min.jpeg',
110
+ alt: 'alt of image',
111
+ title: 'title of image',
112
+ index: 1
113
+ }, {
114
+ image: '.../iOe/xHHf4nf8AE75h3j1x64ZmZ//Z==', // Support base64 image
115
+ thumbImage: '.../iOe/xHHf4nf8AE75h3j1x64ZmZ//Z==', // Support base64 image
116
+ title: 'Image title', //Optional: You can use this key if want to show image with title
117
+ alt: 'Image alt', //Optional: You can use this key if want to show image with alt
118
+ order: 1, //Optional: if you pass this key then slider images will be arrange according @input: slideOrderType
119
+ index: 2
120
+ }
77
121
  ];
78
122
  ```
79
123
 
@@ -81,26 +125,26 @@ imageObject: Array<ImageObject> = [{
81
125
 
82
126
  ```js
83
127
  imageObject: Array<ImageObject> = [{
84
- video: 'https://youtu.be/....' // Youtube url
85
- index: 1
86
- },
87
- {
88
- video: 'assets/video/********.mp4', // MP4 Video url
128
+ video: 'https://youtu.be/....' // Youtube url
129
+ index: 1
130
+ },
131
+ {
132
+ video: 'assets/video/********.mp4', // MP4 Video url
89
133
  index: 2
90
- },
91
- {
92
- video: 'assets/video/movie2.mp4',
134
+ },
135
+ {
136
+ video: 'assets/video/movie2.mp4',
93
137
  posterImage: 'assets/img/slider/2_min.jpeg', //Optional: You can use this key if you want to show video poster image in slider
94
138
  title: 'Image title',
95
139
  index: 3
96
- },
97
- {
98
- image: 'assets/img/slider/1.jpg',
140
+ },
141
+ {
142
+ image: 'assets/img/slider/1.jpg',
99
143
  thumbImage: 'assets/img/slider/1_min.jpeg',
100
144
  alt: 'Image alt',
101
145
  index: 4
102
- }
103
- ...
146
+ }
147
+ ...
104
148
  ];
105
149
  ```
106
150
 
@@ -131,13 +175,14 @@ imageObject: Array<ImageObject> = [{
131
175
  ## Add custom navigation button
132
176
 
133
177
  ```typescript
178
+ import { Component, ViewChild } from '@angular/core';
134
179
  import { RmImageSliderComponent } from 'rm-image-slider';
135
180
 
136
181
  @Component({
137
- selector: 'sample',
138
- standalone: true,
139
- imports: [RmImageSliderComponent],
140
- template:`
182
+ selector: 'sample',
183
+ standalone: true,
184
+ imports: [RmImageSliderComponent],
185
+ template:`
141
186
  <rm-image-slider [images]="imageObject" #nav>
142
187
  </rm-image-slider>
143
188
  <button (click)="prevImageClick()">Prev</button>
@@ -145,38 +190,113 @@ import { RmImageSliderComponent } from 'rm-image-slider';
145
190
  `
146
191
  })
147
192
  class Sample {
148
- @ViewChild('nav') slider: RmImageSliderComponent;
149
- imageObject = [{...}]
193
+ @ViewChild('nav') slider: RmImageSliderComponent;
194
+ imageObject = [{...}]
150
195
 
151
- prevImageClick() {
152
- this.slider.prev();
153
- }
196
+ prevImageClick() {
197
+ this.slider.prev();
198
+ }
154
199
 
155
- nextImageClick() {
156
- this.slider.next();
157
- }
200
+ nextImageClick() {
201
+ this.slider.next();
202
+ }
158
203
  }
159
204
  ```
160
- <a name="issues"/>
161
205
 
162
- ## Issues
206
+ ---
163
207
 
164
- If you identify any errors in this component, or have an idea for an improvement, please open
165
- an [issue](https://github.com/malikrajat/rm-image-slider/issues). I am excited to see what the community thinks of this
166
- project, and I would love your input!
208
+ ## 🧭 Compatibility
167
209
 
168
- ## Author services
210
+ | Angular Version | Support | Standalone | Notes |
211
+ |-----------------|---------|------------|-------|
212
+ | 14.x | ✅ Full | ✅ Yes | Minimum required |
213
+ | 15.x | ✅ Full | ✅ Yes | Recommended |
214
+ | 16.x | ✅ Full | ✅ Yes | Recommended |
215
+ | 17.x | ✅ Full | ✅ Yes | Latest tested |
216
+ | 18.x+ | ✅ Expected | ✅ Yes | Should work |
169
217
 
170
- Are you interested in this library but lacks features? Write to the author, he can do it for you.
218
+ ---
171
219
 
172
- ## Credits
220
+ ### 🧭 Browser Support
221
+
222
+ | Browser | Version | Support |
223
+ |---------|---------|---------|
224
+ | Chrome | 80+ | ✅ Full |
225
+ | Firefox | 75+ | ✅ Full |
226
+ | Safari | 13+ | ✅ Full |
227
+ | Edge | 80+ | ✅ Full |
228
+
229
+ ---
230
+
231
+ ## 🌳 Tree-Shaking and Optimization
173
232
 
174
- The library is inspired by one other library.
233
+ - The library is marked as `sideEffects: false` to support advanced tree-shaking.
234
+ - The service-based API is inherently tree-shakable; it won\'t be included in your bundle if it\'s not imported and used.
175
235
 
236
+ ---
176
237
 
177
- <a name="author"/>
238
+ ### Development Setup
178
239
 
179
- ## Author
240
+ ```bash
241
+ git clone https://github.com/malikrajat/rm-image-slider.git
242
+ cd rm-rm-image-slider
243
+ pnpm install
244
+ pnpm start # Serves test app on localhost:4200
245
+
246
+ ```
247
+
248
+ ---
249
+
250
+ ## 🐛 Issues & Support
251
+
252
+ - 🐛 [Report Bug](https://github.com/malikrajat/rm-image-slider/issues/new?template=bug_report.md)
253
+ - 💡 [Request Feature](https://github.com/malikrajat/rm-image-slider/issues/new?template=feature_request.md)
254
+ - 💬 [Discussions](https://github.com/malikrajat/rm-image-slider/discussions)
255
+ - 📧 [Email Support](mailto:mr.rajatmalik@gmail.com?subject=rm-image-slider%20Support)
256
+
257
+ ---
258
+
259
+ ## 📄 License
260
+
261
+ MIT License - see [LICENSE](LICENSE) file for details.
262
+
263
+ ---
264
+
265
+ ## 👨‍💻 Author
180
266
 
181
267
  **Rajat Malik**
182
- - [github/malikrajat](https://github.com/malikrajat)
268
+ - 🌐 Website: [rajatmalik.dev](https://rajatmalik.dev)
269
+ - 📧 Email: [mr.rajatmalik@gmail.com](mailto:mr.rajatmalik@gmail.com)
270
+ - 💼 LinkedIn: [Connect with me](https://linkedin.com/in/errajatmalik)
271
+
272
+ ---
273
+
274
+ ## 💝 Show Your Support
275
+
276
+ If this library has saved you development time and helped create amazing image sliders in your projects, **please consider giving it a ⭐ star!**
277
+
278
+ 🌟 **Why star this repo?**
279
+ - Help other developers discover this lightweight, optimized solution
280
+ - Support continued development and improvements
281
+ - Show appreciation for free, quality tools
282
+ - Boost visibility in the Angular community
283
+
284
+ ### 🚀 **Want More Quality Libraries?**
285
+
286
+ This is just one of several useful libraries I've created. **[Explore my other Angular & web development libraries](https://github.com/malikrajat?tab=repositories)** that might solve your next challenge:
287
+
288
+ - 🔧 **Utility libraries** for common development tasks
289
+ - 🎨 **UI components** for better user experiences
290
+ - ⚡ **Performance tools** for optimization
291
+ - 📱 **Mobile-friendly solutions** for responsive apps
292
+
293
+ **Found them helpful?** A star on each repo you find useful helps tremendously! It takes just one click but means the world to open-source maintainers.
294
+
295
+ [![GitHub followers](https://img.shields.io/github/followers/malikrajat?style=social)](https://github.com/malikrajat)
296
+ [![GitHub stars](https://img.shields.io/github/stars/malikrajat/rm-image-slider?style=social)](https://github.com/malikrajat/rm-image-slider/stargazers)
297
+
298
+ ---
299
+
300
+ ## Credits
301
+
302
+ The library is inspired by one other library.
Binary file