Skip to content
Folio

Website

Music

Featured recordings, track rows and playlist collections.

Usage

When to reach for it

Present supplied listening data and playback controls without choosing a music service.

Ships from@misoto22/folio/website

TSX
import { MediaListRow } from '@misoto22/folio/website'

Notes

A ranked recording or artist, controlled by the host's one media player.

Best practices

Do

  • Supply localized labels, descriptive links and meaningful image alternatives.

Don’t

  • Do not put service credentials, routing logic or backend models inside presentation components.

Examples

recording and preview state

Recording information and preview state arrive as props from the host player. This example toggles the visible state without loading or playing audio.

Artwork unavailable

Selected recording

Morning light

The Field Ensemble

0:42
3:00
1
Morning light
The Field Ensemble
3:00

Parts

Composed at the call site rather than configured through props, so a layout this component did not anticipate is still expressible.

MusicFeature

The same media feature geometry for playing, recent and unavailable recordings.

MusicFeature props
PropTypeDefaultDescription
artworkFallbackrequiredstring
labelrequiredstring
titlerequiredReactNode
actionReactNode
artworkReactNode
descriptionReactNode
livebooleanfalse
noticestring
progress{ label: string; value: number; max: number; currentLabel: string; endLabel: string }

Also accepts everything in Omit<HTMLAttributes<HTMLElement>, 'title'>. Those are forwarded to the underlying element and are not listed row by row.

MediaCollectionCard

A playlist, album or other media collection with one explicit preview action.

MediaCollectionCard props
PropTypeDefaultDescription
previewrequiredMediaPreviewAction
titlerequiredReactNode
artworkReactNode
descriptionstring | null
metadataReactNode
tagstring | null

Also accepts everything in Omit<HTMLAttributes<HTMLElement>, 'title'>. Those are forwarded to the underlying element and are not listed row by row.

MusicSection

A media list's heading, caption and collection layout.

MusicSection props
PropTypeDefaultDescription
childrenrequiredReactNode
titlerequiredstring
captionstring
layout'list' | 'collections''list'

Also accepts everything in HTMLAttributes<HTMLElement>. Those are forwarded to the underlying element and are not listed row by row.