image-carousel-saifali17x
v1.1.6
Published
A simple, lightweight, and reusable image carousel component for web projects
Maintainers
Readme
Image Carousel
A simple, lightweight, and reusable image carousel component for web projects.
Features
- Pure JavaScript, no dependencies
- Easy to use and customize
- Responsive with smooth transitions
- Auto-slide with navigation arrows and dots
Installation
npm install your-image-carouselUsage
Import the function and call it with a container selector and an array of image URLs:
import { createCarousel } from 'your-image-carousel';
createCarousel('#carousel-container', [
'https://example.com/image1.jpg',
'https://example.com/image2.jpg',
'https://example.com/image3.jpg',
]);Make sure your HTML contains a container element, e.g.:
<div id="carousel-container"></div>Development
Clone the repo and install dependencies:
npm installRun development server:
npm run startBuild for production:
npm run buildLicense
MIT © Your Name
---
# Steps to Publish Your Package on npm
1. **Login to npm** (if not already):
```bash
npm loginEnter your npm username, password, and email.
- Build your package
Make sure your dist folder is up to date:
npm run build- Verify your
package.json
"main"or"module"should point to your built file (e.g.,"dist/index.js")"files"array includes your built files (likedist/)"version"is updated (npm won’t let you publish the same version twice)
- Publish
Run:
npm publish