Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cedpoilly/fec-slideshow

Web Component version of a HTML + CSS slideshow from this article: https://mrsunshyne.gitlab.io/blog/a-slideshow-using-css-animations-custom-properties
https://github.com/cedpoilly/fec-slideshow

css css-custom-properties html javascript web-component

Last synced: about 2 months ago
JSON representation

Web Component version of a HTML + CSS slideshow from this article: https://mrsunshyne.gitlab.io/blog/a-slideshow-using-css-animations-custom-properties

Awesome Lists containing this project

README

        

# Front-End Coders Slideshow

An experimental web component based of an article found online (link will be available soon).

## HTML & CSS, No JavaScript

In the article no JavaScript was needed, thus for the slideshow functionality itself no JavaScript is required.
However when consuming the component JavaScript is required to set the images.

See the content of the body for this demo:

```html

.fec-slideshow {
height: 100vh;
width: 100%;
}

const slideshow = document.querySelector(".fec-slideshow");

slideshow.preload = true;

const images = [
"https://picsum.photos/id/231/1000/550",
"https://picsum.photos/id/232/1000/550",
"https://picsum.photos/id/233/1000/550",
"https://picsum.photos/id/234/1000/550",
"https://picsum.photos/id/235/1000/550"
];

slideshow.images = images;

```