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 of the library, drawn as Songstress draws it: a song node.
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 of the library: an album node.
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 of the library: an artist node.
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 of the library: a playlist node, a card of a Shelf (a List takes rows and songs alone).
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 button, for songs, an album, an artist or a playlist: a play-button node.
import { PlayButton } from 'songstress/ui'
const play = <PlayButton what={{ albumId: 'al-1' }} title="Play the album" />In the reference: PlayButton.
Prop
Type