Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dev-madhurendra/elemetary-carousel-npm-package
Elementary carousel : A npm package
https://github.com/dev-madhurendra/elemetary-carousel-npm-package
carousel-slider npm-package npmjs
Last synced: about 2 months ago
JSON representation
Elementary carousel : A npm package
- Host: GitHub
- URL: https://github.com/dev-madhurendra/elemetary-carousel-npm-package
- Owner: dev-madhurendra
- License: mit
- Created: 2024-03-01T11:07:13.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-01T11:08:59.000Z (10 months ago)
- Last Synced: 2024-10-13T08:21:19.175Z (3 months ago)
- Topics: carousel-slider, npm-package, npmjs
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/elementary-carousel/v/1.0.2
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Elementary Carousel
Elementary Carousel is a lightweight and easy-to-use carousel component for React applications. It provides a simple yet effective way to showcase content in a carousel format.
## Installation
You can install Elementary Carousel via npm:
```bash
npm install elementary-carousel
```## Usage
To use Elementary Carousel in your React application, simply import it and render it with your desired content.
```jsx
import React from 'react';
import ElementaryCarousel from 'elementary-carousel';const CarouselExample = () => {
const carouselItems = [
{ id: 1, content: 'Slide 1' },
{ id: 2, content: 'Slide 2' },
{ id: 3, content: 'Slide 3' },
];return (
);
};export default CarouselExample;
```## Props
Elementary Carousel accepts the following props:
- `carouselContentArr`: An array of objects representing the content to be displayed in the carousel. Each object should have a unique `id` and a `content` property.
## Examples
### Basic Carousel
```jsx
import React from 'react';
import ElementaryCarousel from 'elementary-carousel';const BasicCarouselExample = () => {
const items = [
{ id: 1, content: 'Slide 1' },
{ id: 2, content: 'Slide 2' },
{ id: 3, content: 'Slide 3' },
];return (
);
};export default BasicCarouselExample;
```### Carousel with Custom Options
```jsx
import React from 'react';
import ElementaryCarousel from 'elementary-carousel';const CustomCarouselExample = () => {
const items = [
{ id: 1, content: 'Slide 1' },
{ id: 2, content: 'Slide 2' },
{ id: 3, content: 'Slide 3' },
];return (
);
};export default CustomCarouselExample;
```## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
---
Feel free to customize the README as needed for your package!