SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

EpisodeList

A season's episodes as an ordered list.

View code
tsx
<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.

Terminal
npm add @sdxc/ui remix
typescript
import "@sdxc/ui/theme.css";

Usage

typescript
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.

  • EpisodeList
  • EpisodeList.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

PropTypeRequiredDescription
hrefstringYesWhere the episode plays.
numbernumberYesThe episode's number in its season, drawn large beside the still.
titlestringYes
stillRemixNodeYesThe still, drawn edge to edge in a 16:9 frame.
durationstringNoThe running time as it reads, such as "48 min".
synopsisRemixNodeNoOne or two sentences on the episode.
progressnumberNoThe share watched, from 0 to 1.
progressLabelstringNoWhat a screen reader hears for the bar, such as "Watched 60%".
currentbooleanNoMarks the episode the viewer is up to, with aria-current on its link.

Also accepts everything in Omit<TagProps<"li">, "title" | "children">.

@sdxc/ui

Can’t find it? Contact us