Audio Player
An audio-only player built on Video.js 10, with a skin that follows the page color scheme and the shadcn/ui tokens, for episodes, tracks and podcasts.
The audio skin adapts its palette to the inherited `color-scheme`, so the same block follows a light or dark page. Pass `poster` to show cover art behind the interface, and keep the episode title and facts in your own layout: the interface only shows what it needs.
Preview
Installation
Add the item with the shadcn CLI, or copy the source manually.
pnpm dlx shadcn@latest add litingyes/blocove/audio-playerRequires a shadcn/ui project set up with Base UI primitives. Blocove is developed against the b0 preset, but it installs no base config or theme tokens: your own preset, fonts and colors stay in place.
Or install from the namespace after adding the registry: npx shadcn@latest add @blocove/audio-player
API Reference
Props accepted by the exported components.
AudioPlayer
The audio-only preset and its skin. It reports the title and the cover art and adapts to the page color scheme; the media is composed inside it.
| Prop | Type | Default |
|---|---|---|
title | string | null | - |
poster | string | null | - |
accentColor | string | Skin default |
className | string | - |
style | CSSProperties | - |
children | ReactNode | Required |
AudioMedia
The native `<audio>` element, with text tracks and a metadata-only preload. Replace it when the source needs another media engine.
| Prop | Type | Default |
|---|---|---|
src | string | - |
tracks | MediaTrack[] | - |
preload | 'none' | 'metadata' | 'auto' | 'metadata' |
...props | AudioHTMLAttributes<HTMLAudioElement> | - |