SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

On this page

TrackList

The track table of an album, a playlist or an artist's top songs.

#TitleAlbumDate addedDurationTitle
1Last Train BloomNeon OrchardMidnight CitrusYesterday4:02
2Contour LinesVelvet CartographyMaps in the DarkYesterday3:47
3Last CrossingNight FerryHarbor Lights3 days ago4:31
4Orange StreetlightsENeon OrchardMidnight Citrus6 days ago3:14
View code
tsx
<TrackList labels={labels} columns={{ album: true, added: true }}>
	<TrackList.Row
		index={1}
		title="Last Train Bloom"
		artists={<a href="/artist/neon-orchard">Neon Orchard</a>}
		album={<a href="/album/midnight-citrus">Midnight Citrus</a>}
		added="Yesterday"
		duration={242}
		play={<TrackList.PlayButton aria-label="Play Last Train Bloom" />}
	/>
</TrackList>

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 { TrackList } from "@sdxc/ui/audio";

Renders the table. Its cells drop to number, title and length on a narrow container, and the whole row plays its track when pressed anywhere outside its own links and controls.

Props

Read from the component's own types, so every prop, every default and every allowed value is listed.

PropTypeRequiredDescription
labelsLabelsYes
columnsColumnsNo
headerbooleanNoShows the heading row from the width where every column fits. @default true
childrenRemixNodeYesTrackList.Row elements in playing order.

Also accepts everything in TagProps<"table">.

@sdxc/ui

Can’t find it? Contact us