SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

On this page

MediaTile

An album, a playlist or an artist in a music library as one tile.

View code
tsx
<MediaTile
	href="/album/tidelight"
	title="Tidelight"
	subtitle="2025 · Lumen Harbor"
	art={<img src="/covers/tidelight.jpg" alt="" />}
	play={<button type="button" aria-label="Play Tidelight">…</button>}
/>

<MediaTile
	shape="round"
	href="/artist/night-ferry"
	title="Night Ferry"
	subtitle="Artist"
	art={<img src="/artists/night-ferry.jpg" alt="" />}
/>

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

Renders the tile, filling its column. The art lifts slightly under the pointer and holds still under reduced motion; the play control appears where a pointer can reach it.

Props

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

PropTypeRequiredDescription
hrefstringYes
titlestringYesThe name, the link's accessible name and the tile's first line.
artRemixNodeYesThe artwork, drawn edge to edge: an <img> or an <svg>.
subtitleRemixNodeNoThe line under the name, such as "Album · Lumen Harbor" or "Artist".
shape"square" | "round"No
playRemixNodeNoA play control over the art's corner, outside the link: a button, or a form holding one. It shows under the pointer and on focus; touch screens reach it through the page.

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

Types

NameValuesWhat it decides
Shape"square" | "round"square for an album or a playlist, round for an artist.
@sdxc/ui

Can’t find it? Contact us