This web component recreates the famous “Coverflow”-style interface, which was popularised by Apple in iTunes. It presents images in an animated, three-dimensional sideways-scrollable interface. Clicking the images controls the movement of the carousel.
You can download code from the coverflow repository on GitHub.
This interface is built using Web Components and must be imported before is is rendered.
import './Coverflow.js';
The web component works with any existing list of images. Below is a simple list before it has been transformed.
This is the default component, with no options set.
Non-square images can be used, for example movie posters.
In this example, the visible
attribute has been set
to 8. This controls how many items are visible at any time.
In this example, the start
attribute has been set
to 1. This means the interface starts at the first item.
When adding the reflection="true"
attribute, a
“shiny-floor” reflection is added. This mimics the design that
was implemented in Apple iTunes.
When adding the endless="true"
attribute, an
endless loop of images is created. When reaching the end of the
items, the component loops back to the beginning and vice-versa.