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

ngx-focus-carousel

v0.0.2

Published

An Angular carousel component with a focus/zoom effect — the center card enlarges as you scroll. Supports custom templates.

Downloads

266

Readme

ngx-focus-carousel

An Angular carousel component with a focus/zoom scroll effect — the card closest to the center automatically enlarges while others stay small. Supports both default image mode and fully custom templates.

Demo Screenshot

Features

  • Scroll-based focus effect — center card zooms in smoothly
  • Default mode with image cards + title overlay
  • Custom template mode — render anything you want per card
  • "Show All" dialog with a grid view of all items
  • Built with Angular Material (mat-card, mat-dialog)
  • Standalone component — no module needed
  • Works with Angular 16+

Installation

npm install ngx-focus-carousel

Peer dependencies (you need these in your project):

npm install @angular/material @angular/cdk

Usage

1. Default Mode (Image Cards)

import { NgxFocusCarouselComponent, CarouselItem } from 'ngx-focus-carousel';

@Component({
  standalone: true,
  imports: [NgxFocusCarouselComponent],
  template: `
    <ngx-focus-carousel [items]="data" (itemClick)="onItemClick($event)">
    </ngx-focus-carousel>
  `
})
export class MyComponent {
  data: CarouselItem[] = [
    { title: 'Mountain', img: 'https://picsum.photos/id/1015/600/400' },
    { title: 'River',    img: 'https://picsum.photos/id/1016/600/400' },
    { title: 'Forest',   img: 'https://picsum.photos/id/1019/600/400' },
    { title: 'Ocean',    img: 'https://picsum.photos/id/1018/600/400' },
  ];

  onItemClick(item: CarouselItem) {
    console.log('Clicked:', item);
  }
}

2. Custom Template Mode

Use ng-template #itemTemplate to render whatever you want inside each card:

@Component({
  standalone: true,
  imports: [NgxFocusCarouselComponent],
  template: `
    <ngx-focus-carousel [items]="profiles">
      <ng-template #itemTemplate let-item>
        <div style="text-align: center; padding: 20px;">
          <img [src]="item.avatar" style="width: 80px; border-radius: 50%;">
          <h3>{{ item.name }}</h3>
          <p>{{ item.role }}</p>
        </div>
      </ng-template>
    </ngx-focus-carousel>
  `
})
export class MyComponent {
  profiles: CarouselItem[] = [
    { name: 'Alice', role: 'Manager',   avatar: 'https://i.pravatar.cc/150?img=1' },
    { name: 'Bob',   role: 'Developer', avatar: 'https://i.pravatar.cc/150?img=3' },
  ];
}

API

Inputs

| Input | Type | Description | |---------|-------------------|---------------------------------| | items | CarouselItem[] | Array of data items to display |

Outputs

| Output | Type | Description | |-------------|----------------------------|-----------------------------------| | itemClick | EventEmitter<CarouselItem> | Emits when a card is clicked |

CarouselItem Interface

interface CarouselItem {
  title?: string;       // Used in default mode
  img?: string;         // Used in default mode
  [key: string]: any;   // Any custom properties for your template
}

License

MIT