MediaTile
An album, a playlist or an artist in a music library as one tile.
View code
<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.
npm add @sdxc/ui remiximport "@sdxc/ui/theme.css";Usage
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.
| Prop | Type | Required | Description |
|---|---|---|---|
href | string | Yes | |
title | string | Yes | The name, the link's accessible name and the tile's first line. |
art | RemixNode | Yes | The artwork, drawn edge to edge: an <img> or an <svg>. |
subtitle | RemixNode | No | The line under the name, such as "Album · Lumen Harbor" or "Artist". |
shape | "square" | "round" | No | |
play | RemixNode | No | A 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
| Name | Values | What it decides |
|---|---|---|
Shape | "square" | "round" | square for an album or a playlist, round for an artist. |