react-youtube-jukebox
DocsAPI & Playground

API & Playground

The public API stays intentionally small in v1. Consumers pass track metadata plus a few playback and positioning props.

type JukeboxTrack = {
  videoId: string;
  title: string;
  artist?: string;
};

type JukeboxTheme = "glass" | "simple" | "sunset" | "ride";
type JukeboxChrome = "classic" | "wallet" | "ride";

type JukeboxProps = {
  tracks: JukeboxTrack[];
  autoplay?: boolean;
  position?:
    | "bottom-right"
    | "bottom-left"
    | "bottom-center"
    | "top-right"
    | "top-left"
    | "top-center";
  theme?: JukeboxTheme;
  chrome?: JukeboxChrome;
  offset?: number | { x: number; y: number };
  portal?: boolean;
  className?: string;
};

Props

PropTypeNotes
tracksJukeboxTrack[]Required. Empty and single-track cases are handled safely.
positionedge presetControls top/bottom placement and supports left, right, or center alignment.
theme"glass" | "simple" | "sunset" | "ride"Optional. Defaults to "glass".
chrome"classic" | "wallet" | "ride"Optional. Switches shell and control styling. Defaults to "classic".
autoplaybooleanDefaults to `true` and starts muted on first load.
offsetnumber | { x, y }Applies spacing from the chosen edge preset.
portalbooleanDefaults to `true`. Inline mode is opt-in.
classNamestringRoot-level hook for limited customization in v1.

Playground

The live preview below renders inline for docs only. The package default remains portal rendering on the viewport, and you can switch themes and chrome presets here to compare the available combinations.

Theme
Chrome