Skip to content
Calm motion: animations on this site only fade, with no movement

Play queue ​

The next tracks in order, which you can change and clear

Shows what plays next in a music or podcast app. The order changes with the sortable list, by drag or with the keyboard.

Basic
Now playing
Episode 41: the final editHome Studio44:00
Next up3 tracks, 1:32:25
  • Episode 42: a guest from the radioHome Studio52:05
  • Bonus: room tone, explainedHome Studio9:00
  • Mixing voices for beginnersEdit Night31:20
  • current is the track that plays now. It shows on top under "Now playing".
  • v-model is the queue: the tracks after the current one, in order. Each track has an id, a title, and the length in seconds. It can also have an artist and an image.
  • Each row has a grip to move it. Drag the grip, or focus it and use the keys of the sortable list. Screen readers hear each move.
  • The picture of a track is a button that emits play with the id. The ✕ button removes the track. Both buttons have the title of the track in their name.
  • The head of the queue shows the number of tracks and their total time. "Clear the queue" empties it.
  • Change the words with labels or a label pack: now, next, empty, clear, and the functions play, remove, and total.

Usage ​

ts
import { BlessPlayQueue } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
currentBlessQueueTrack—the track that plays now, above the queue
labelsPartial<{ now: string; next: string; empty: string; clear: string; play: (title: string) => string; remove: (title: string) => string; total: (count: number, time: string) => string; }>—
modelValueBlessQueueTrack[][]the tracks after the current one, in order

Events

NamePayloadDescription
update:modelValue[value: BlessQueueTrack[]]
play[id: string]

Released under the MIT License. Character names and artwork belong to their owners.