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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@atom-design-mog/moglix-carousel

v1.0.1

Published

A React Native carousel component with auto-play, dots, and progress bar.

Readme

@atom-design-mog/moglix-carousel

A modern, auto-playing, fully responsive React Native Carousel built for the Atom Design System (Moglix). Supports image banners, color slides, text overlays, dots navigation, and an animated progress bar.


📦 Installation

Install with npm:

npm install @atom-design-mog/moglix-carousel

Or with yarn:

yarn add @atom-design-mog/moglix-carousel

🚀 Basic Usage

import MoglixCarousel from '@atom-design-mog/moglix-carousel';

export default function Home() {
  const slides = [
    { content: 'Welcome To Moglix', background: '#d9232d' },
    { background: 'https://cdn.moglix.com/banner1.png' },
    { background: 'https://cdn.moglix.com/banner2.png' },
    { content: 'Thank You!', background: '#d9232d' },
  ];

  return (
    <MoglixCarousel slides={slides} autoPlay autoPlayInterval={3000} />
  );
}

🎞 Slide Format

Each slide supports either a solid color or an image background.

Color slide example:

{ content: 'Welcome', background: '#d9232d' }

Image slide example:

{ background: 'https://cdn.moglix.com/cms/your-image.png', content: 'Big Sale!' }

🧩 Component Props

| Prop | Type | Default | Description | | -------------------- | --------- | ------- | -------------------------------------------- | | slides | Array | [] | List of slides (image/color + optional text) | | autoPlay | boolean | true | Enables automatic sliding | | autoPlayInterval | number | 3000 | Time (ms) before moving to next slide |


✨ Features

  • Auto-play with smooth transitions
  • Looping carousel behavior
  • Touch-enabled (swipe left / right)
  • Animated progress bar per slide
  • Dots navigation with active state
  • Supports image banners and solid color slides
  • Text overlay on images
  • Fully responsive and adapts to device width
  • Works inside or outside ScrollView

🧪 Test Screen Example

import React from 'react';
import { View, Text } from 'react-native';
import MoglixCarousel from '@atom-design-mog/moglix-carousel';

export default function TestCarouselScreen() {
  const slides = [
    { content: 'Welcome To Moglix', background: '#d9232d' },
    { background: 'https://cdn.moglix.com/cms/flyout/Image_2025-11-17_12:26:40.392_Konica_Minolta_Platinum_pwa1.png' },
    { background: 'https://cdn.moglix.com/cms/flyout/Image_2025-11-17_12:24:49.838_Singhal-Platinum-pwa.png' },
    { background: 'https://cdn.moglix.com/cms/flyout/Image_2025-11-17_12:26:41.002_vinspire_Platinum_pwa1.png' },
    { content: 'Thank You!', background: '#d9232d' },
  ];

  return (
    <View style={{ flex: 1, backgroundColor: '#fff' }}>
      <View style={{ padding: 16 }}>
        <Text style={{ fontSize: 18, fontWeight: '600' }}>Carousel Component</Text>
      </View>

      <MoglixCarousel slides={slides} autoPlay autoPlayInterval={3000} />

      <View style={{ padding: 16 }}>
        <Text>Below Carousel Content...</Text>
      </View>
    </View>
  );
}

📁 Slide Object Structure

type Slide = {
  background: string; // Image URL OR Color like '#d9232d'
  content?: string;   // Optional overlay text
}

📸 Notes

  • Supports JPG / PNG / WebP banners and full-width images. The component calculates height from device width for consistent aspect ratio.
  • If you need different aspect ratios or custom slide heights, wrap the component or modify styles as needed.

👤 Author

Avi Gupta