MiniPlayer

MiniPlayer is an animated mini player component for React Native and React, from the dissolve library. Now playing pill that opens into a full player as one object, then folds back.

A now playing bar in liquid glass that opens into the full player as one object, then folds back. Width, height, radius, artwork and the glass surface all follow one value, the artwork arcs into place, and a vertical drag drives it 1:1. In the pill the title sits centered beside the artwork and truncates before the controls. Swipe the closed pill sideways to skip.

Install

React Native

Install the engine once per app and wrap the root layout in <DissolveProvider> (see Installation), then copy the component into components/dissolve:

npx expo install dissolve-ui @shopify/react-native-skia react-native-reanimated react-native-worklets react-native-gesture-handler expo-haptics
npx dissolve-ui add mini-player --native
npx shadcn@latest add https://dissolve.rselmi.com/r/native/mini-player.json

React

Needs React 19 and react-dom, nothing else: no engine, no provider, no Tailwind. Works in the Next.js App Router.

npx dissolve-ui add mini-player --web
npx shadcn@latest add https://dissolve.rselmi.com/r/mini-player.json

Usage

MiniPlayer.tsx (React Native)
import { MiniPlayer } from '@/components/dissolve/mini-player';

// Liquid glass surface: npx expo install expo-glass-effect
// Last child of a full screen container: it covers it when open.
<MiniPlayer
  title="Night Swim"
  subtitle="Low Tide"
  artwork={cover}
  progress={0.3}
  duration={214}
  playing={playing}
  onPlayPause={toggle}
  onNext={next}
  onPrev={prev}
/>
MiniPlayer.tsx (React)
import { MiniPlayer } from '@/components/dissolve/mini-player';

// Last child of a positioned container (relative, full screen): it covers it when open.
<MiniPlayer
  title="Night Swim"
  subtitle="Low Tide"
  artwork="/covers/night-swim.jpg"
  progress={0.3}
  duration={214}
  playing={playing}
  onPlayPause={toggle}
  onNext={next}
  onPrev={prev}
/>

Props

PropTypeDefaultDescription
titlestringrequiredTrack title. Centered beside the artwork and truncated before the controls in the pill, it travels to centered below the artwork.
subtitlestringArtist or album.
artworkImageSourcerequiredCover, grows from 40 pt to the player width.
progressnumber0Track progress, 0 to 1.
durationnumberTrack length in seconds. Shows the elapsed and remaining times.
playingbooleanrequiredPlay or pause glyph.
onPlayPause() => voidrequiredPlay and pause buttons.
onNext / onPrev() => voidSkip buttons and the sideways swipe on the pill.
expandedbooleanControlled open state.
onExpandedChange(expanded: boolean) => voidCalled when it opens or folds back.
renderExpanded(api: { close }) => ReactNodeReplaces the bottom row of the open player (lyrics, AirPlay, queue).
bottomnumber24Gap under the closed pill, and bottom padding when open.
topInsetnumber60Gap left above the open player.
hapticsbooleantrueRigid when it locks open, light on close, a tick crossing halfway.
glassbooleantrueLiquid glass surface (expo-glass-effect, iOS 26+). Falls back to the surface token with a hairline border.
classNamestringPlayer surface classes (background, border) for the fallback surface.

Source

Previous: BarChart · Next: PullToRefresh · All components

dissolve is MIT licensed. Source on GitHub, package on npm. This page as markdown. For AI agents: llms.txt.