Skip to Content
Documentation

The library

The components of songstress/ui for the library, each as Songstress draws it, with its props and an example.

Songstress’s own things, named by library id and drawn exactly as the app draws them everywhere else, with their own menus, covers and Play. Client code learns ids from the player, a panel’s context or a command of your server entry.

Each picture is the SDK’s own test tree for the component, drawn by the web app; every app draws the same tree with its own controls, the phones natively. Each example is the one in the SDK’s doc comment, which its tests compile, and the props are read from its types.

SongItem

A song from the library, as a row with its cover, artist and menuA song from the library, as a row with its cover, artist and menu

A song of the library, drawn as Songstress draws it: a song node.

Example: SongItem
import { List, SongItem } from 'songstress/ui'

const songIds = ['s1', 's2']
const recent = <List title="Played lately">{songIds.map((id) => <SongItem key={id} id={id} />)}</List>

In the reference: SongItem.

Prop

Type

AlbumItem

An album from the library, as Songstress draws itAn album from the library, as Songstress draws it

An album of the library: an album node.

Example: AlbumItem
import { AlbumItem, Shelf } from 'songstress/ui'

const albumIds = ['al-1', 'al-2']
const albums = <Shelf title="Albums">{albumIds.map((id) => <AlbumItem key={id} id={id} />)}</Shelf>

In the reference: AlbumItem.

Prop

Type

ArtistItem

An artist from the library, as Songstress draws itAn artist from the library, as Songstress draws it

An artist of the library: an artist node.

Example: ArtistItem
import { ArtistItem, Shelf } from 'songstress/ui'

const artists = (
  <Shelf title="Artists">
    <ArtistItem id="ar-1" />
    <ArtistItem id="ar-2" />
  </Shelf>
)

In the reference: ArtistItem.

Prop

Type

PlaylistItem

A playlist from the library, as Songstress draws itA playlist from the library, as Songstress draws it

A playlist of the library: a playlist node, a card of a Shelf (a List takes rows and songs alone).

Example: PlaylistItem
import { PlaylistItem, Shelf } from 'songstress/ui'

const playlists = (
  <Shelf title="Your playlists">
    <PlaylistItem id="pl-1" />
  </Shelf>
)

In the reference: PlaylistItem.

Prop

Type

PlayButton

The app’s own Play, for an album, and Play both for two songsThe app’s own Play, for an album, and Play both for two songs

The app's own Play button, for songs, an album, an artist or a playlist: a play-button node.

Example: PlayButton
import { PlayButton } from 'songstress/ui'

const play = <PlayButton what={{ albumId: 'al-1' }} title="Play the album" />

In the reference: PlayButton.

Prop

Type

On this page