npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dastgeer-carousel

v0.0.6

Published

dastgeer-carousel is an Angular library designed for creating image galleries with a modal viewer. It offers customizable navigation and various features to enhance your gallery experience.

Downloads

405

Readme

dastgeer-carousel

dastgeer-carousel is an Angular library designed for creating image galleries with a modal viewer. It offers customizable navigation and various features to enhance your gallery experience.

Features

  • Image Gallery: Display a collection of images with clickable thumbnails.
  • Image Modal: View images in a modal with zoom in, zoom out, and download capabilities.
  • Customizable Navigation: Easily customize the next and previous buttons with FontAwesome or other icons.

Installation

To use dastgeer-carousel, you'll need to install the following packages:

npm install @fortawesome/angular-fontawesome @fortawesome/free-solid-svg-icons

Usage

1. Import the Library

Import the necessary modules into your Angular project.

import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { MainSliderComponent } from 'dastgeer-carousel';

@NgModule({
  imports: [
    MainSliderComponent,
    FontAwesomeModule,
    // other imports...
  ],
  // ...
})
export class AppModule { }

2. Add the Gallery and Image Modal

In your component template, use the library components to set up the gallery and image modal.

<div class="mt-5 flex justify-center gap-2">
  <div class="w-[20%]" *ngFor="let image of galleryImages; let i = index">
    <img 
      class="rounded-[20px] cursor-pointer" 
      [src]="image.small" 
      alt="Thumbnail" 
      (click)="imageModal.openModal(i)">
  </div>
</div>

<main-slider 
  [images]="galleryImages" 
  [prevButtonIcon]="faCircleChevronLeft" 
  [nextButtonIcon]="faCircleChevronRight" 
  #imageModal>
</main-slider>

3. Customize Navigation Buttons

You can customize the navigation buttons by passing any FontAwesome icon (or other icons) to the prevButtonIcon and nextButtonIcon inputs.

import { faCircleChevronLeft, faCircleChevronRight } from '@fortawesome/free-solid-svg-icons';

export class YourComponent {

     galleryImages = [
      {
        small: 'https://via.placeholder.com/600x400?text=Image+1'
      },
      {
        small: 'https://via.placeholder.com/600x400?text=Image+2'
      },
      {
        small: 'https://via.placeholder.com/600x400?text=Image+3'
      },
      {
        small: 'https://via.placeholder.com/600x400?text=Image+4'
      },
      {
        small: 'https://via.placeholder.com/600x400?text=Image+4'
      },
      // Add more images as needed
    ];

  faCircleChevronLeft = faCircleChevronLeft;
  faCircleChevronRight = faCircleChevronRight;
}

Code Scaffolding

To generate a new component within this library, run:

ng generate component component-name --project my-lib

You can also generate other Angular elements (e.g., directives, services) using:

ng generate directive|pipe|service|class|guard|interface|enum|module --project my-lib

Developed and managed by DastgeerTech Studio.