Slider for Web Components in an AppleTV style
npm install apple-tv-sliderThis is a custom web component that creates a slider in the style of Apple TV.
First, you need to import the component:
``typescript`
import "./apple-tv-slider"
To use the appletv-slider component, you can add it to your HTML:
`html`
style="width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0;"
src="https://picsum.photos/600/400?1"
/>
style="width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0;"
src="https://picsum.photos/600/400?2"
/>
style="width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0;"
src="https://picsum.photos/600/400?3"
/>
style="width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0;"
src="https://picsum.photos/600/400?4"
/>
style="width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0;"
src="https://picsum.photos/600/400?5"
/>
- speed: The speed of the slide transition. Default is '1000ms'.
- The slides: This is where you put the content of each slide.
- change`: This event is fired when the active slide changes.