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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@severfam/simple-slider-angular

v0.1.2

Published

A lightweight, configurable photo slider/gallery component for Angular with touch support, arrow navigation, and full customization via signal-based inputs.

Readme

Simple Slider Angular

A lightweight, configurable photo slider/gallery component for Angular with touch support, arrow navigation, and full customization via signal-based inputs.

Installation

npm install @severfam/simple-slider-angular

Requirements

  • Angular 21+
  • @angular/common
  • @angular/core
  • @angular/platform-browser

Usage

Import

import { SimpleSliderComponent, ISliderPhoto } from '@severfam/simple-slider-angular';

Component

@Component({
  selector: 'app-root',
  imports: [SimpleSliderComponent],
  template: `
    <lib-simple-slider
      [propertyPhotos]="photos"
      [selectedElementIndex]="selectedIndex"
      [cardWidth]="100"
      [cardHeight]="150"
      (changeModel)="onSelect($event)"
    ></lib-simple-slider>
  `,
})
export class App {
  protected photos: ISliderPhoto[] = [
    { url: 'https://example.com/photo1.jpg', name: 'Photo 1', alt: 'Description' },
    { url: 'https://example.com/photo2.jpg', name: 'Photo 2', alt: 'Description' },
  ];

  protected selectedIndex = 0;

  onSelect(index: number): void {
    this.selectedIndex = index;
  }
}

API Reference

Interface: ISliderPhoto

interface ISliderPhoto {
  url: string | SafeResourceUrl;
  name: string;
  alt: string;
  disabled?: boolean;
}

| Property | Type | Required | Description | |----------|------|----------|-------------| | url | string \| SafeResourceUrl | Yes | URL of the photo | | name | string | Yes | Display name of the photo | | alt | string | Yes | Alt text for accessibility | | disabled | boolean | No | If true, the photo cannot be selected |

Inputs

Data

| Input | Type | Default | Description | |-------|------|---------|-------------| | propertyPhotos | ISliderPhoto[] | [] | Array of photos to display | | selectedElementIndex | number | 0 | Index of the currently selected photo |

Card Dimensions

| Input | Type | Default | Description | |-------|------|---------|-------------| | cardWidth | number | 60 | Width of each photo card in pixels | | cardHeight | number | 90 | Height of each photo card in pixels | | cardMargin | number | 10 | Horizontal margin between cards in pixels | | cardPadding | number | 2 | Padding inside each card in pixels | | borderWidth | number | 1 | Border width of each card in pixels |

Colors

| Input | Type | Default | Description | |-------|------|---------|-------------| | activeBorderColor | string | '#1976d2' | Border color for the selected photo | | defaultBorderColor | string | '#fff' | Border color for non-selected photos | | arrowColor | string | '#333' | Color of the arrow icons | | inactiveIconColor | string | '#9e9e9e' | Color of arrow icons when disabled | | arrowBackgroundColor | string | 'transparent' | Background color of arrow buttons | | arrowBorderColor | string | 'transparent' | Border color of arrow buttons | | arrowBorderWidth | number | 0 | Border width of arrow buttons in pixels |

Behavior

| Input | Type | Default | Description | |-------|------|---------|-------------| | longClickDelay | number | 200 | Delay in ms before long press triggers continuous scrolling | | touchDelta | number | 20 | Minimum horizontal movement in px to trigger a swipe | | arrowWidth | number | 36 | Width of arrow buttons in pixels |

Outputs

| Output | Type | Description | |--------|------|-------------| | changeModel | number | Emits the index of the photo when clicked |

Public Methods

| Method | Description | |--------|-------------| | stepPrevSlider() | Navigate to the previous photo | | stepNextSlider() | Navigate to the next photo | | computedPositionSlider() | Recalculate slider position based on selectedElementIndex |

Features

  • Signal-based inputs (Angular 21+)
  • Touch swipe support
  • Mouse wheel navigation
  • Long press on arrows for continuous scrolling
  • Auto-hiding arrows when all photos are visible
  • Responsive to window resize
  • Configurable dimensions, colors, and behavior
  • Lightweight with no external dependencies