Go to file
NetMan f962f43b52 Fixed buttons and dots positioning 2024-02-20 17:28:17 +01:00
.gitignore Initial commit, completed project 2024-02-19 14:19:54 +01:00
README.md Initial commit, completed project 2024-02-19 14:19:54 +01:00
index.js Initial commit, completed project 2024-02-19 14:19:54 +01:00
package.json 1.0.2 2024-02-20 17:26:30 +01:00
style.css Fixed buttons and dots positioning 2024-02-20 17:28:17 +01:00

README.md

odin-simple-image-slider

Simple image slider - slides through images

My third npm package with the-odin-project

usage

install: npm i odin-simple-image-slider

import in your project:

import imageSlider from "odin-simple-image-slider"

the default style is at ./node_modules/odin-simple-image-slider/style.css and is imported at index.js in the same location

syntax

imageSlider(...images)

example

import imageSlider from "./simple-image-slider/index.js";
import Grass from './grass.jpg';
import Snow from './snow.jpg';
import Pc from './pc.jpg';
import Desert from './desert.jpg';


const app = document.querySelector('#app');

app.append(imageSlider(Grass, Snow, Pc, Desert));

it returns a dom node that you can append using append/appendChild

license

ISC