EpisodeList
A season's episodes as an ordered list.
View code
<EpisodeList aria-label="Tidewater, season 1">
<EpisodeList.Item
href="/watch/tidewater/1-1"
number={1}
title="Last Ferry"
still={<img src="/stills/tidewater-101.jpg" alt="" />}
duration="52m"
synopsis="The year's final crossing docks one passenger short."
progress={1}
progressLabel="Watched"
/>
<EpisodeList.Item
href="/watch/tidewater/1-2"
number={2}
title="Slack Water"
still={<img src="/stills/tidewater-102.jpg" alt="" />}
duration="47m"
synopsis="A diver finds a car where the old pier used to stand."
progress={0.35}
progressLabel="35% watched"
current
/>
</EpisodeList>Installation
An ordinary dependency: install it, import the theme once, and import the component where it is used.
npm add @sdxc/ui remiximport "@sdxc/ui/theme.css";Usage
import { EpisodeList } from "@sdxc/ui/video";Renders the list. It is an <ol>, so a screen reader hears where each episode falls in the
season, and each row is one link named by its number and title.
Composition
The parts the component publishes, each a static property of the host.
EpisodeListEpisodeList.ItemOne episode row.
Props
Read from the component's own types, so every prop, every default and every allowed value is listed.
Also accepts everything in TagProps<"ol">.
EpisodeList.Item
| Prop | Type | Required | Description |
|---|---|---|---|
href | string | Yes | Where the episode plays. |
number | number | Yes | The episode's number in its season, drawn large beside the still. |
title | string | Yes | |
still | RemixNode | Yes | The still, drawn edge to edge in a 16:9 frame. |
duration | string | No | The running time as it reads, such as "48 min". |
synopsis | RemixNode | No | One or two sentences on the episode. |
progress | number | No | The share watched, from 0 to 1. |
progressLabel | string | No | What a screen reader hears for the bar, such as "Watched 60%". |
current | boolean | No | Marks the episode the viewer is up to, with aria-current on its link. |
Also accepts everything in Omit<TagProps<"li">, "title" | "children">.