Audio Player
Shimokitazawa record-shop inspired audio deck with unified features across inline, square, compact, and draggable floating variants.
Interactive Playground
Same full hi-fi controls across every layout — switch between inline, square, and compact.
audio-player-inline.tsx
Deck Standby
FLAC320 KBPS

Midnight Groove
Shimokita Sessions
0:003:00
Variant
Square Record-Sleeve Card
Compact square hi-fi deck tailored for sidebars, album grids, and profile cards.
audio-player-square.tsx
Deck Standby
FLAC320 KBPS

Midnight Groove
Shimokita Sessions
0:003:00
Compact Strip
Low-profile audio bar with spinning mini disc, scrubber, and transport.
audio-player-compact.tsx

Midnight Groove
·Shimokita Sessions
FLAC0:003:00
Draggable Floating Dock
Shares the exact same hi-fi deck features as inline, with drag-and-drop positioning, minimize-to-disc, and configurable spawn.
audio-player-floating.tsx
Spawns at
bottom-centerSpawn
Quick Import
Drop into any layout with a track object and your preferred variant.
Example.tsxtsx
1import { AudioPlayer } from "@rekodo/react";2
3export function Example() {4 return (5 <AudioPlayer6 variant="square"7 track={{8 title: "Midnight Groove",9 artist: "Shimokita Sessions",10 format: "FLAC",11 bitrate: "320 KBPS",12 cover: "/album-art.jpg",13 }}14 />15 );16}API Reference
Props accepted by this component.
| Prop | Type | Default | Description |
|---|---|---|---|
| track | AudioPlayerTrack | — | Track metadata including title, artist, format, bitrate, cover, and optional audio src. |
| variant | "inline" | "square" | "compact" | "floating" | "inline" | Layout preset sharing the same full transport, scrubber, and metadata features. |
| showTonearm | boolean | true (inline/floating), false (square/compact) | Controls whether the mechanical tonearm is shown on the vinyl platter. |
| spawnPosition | "bottom-center" | "bottom-left" | "bottom-right" | "top-right" | "center" | { x: number; y: number } | "bottom-center" | Initial viewport anchor or coordinates when using the floating variant. |
| defaultExpanded | boolean | true | Whether the floating variant starts expanded as a deck or minimized as a vinyl disc. |
| onPlayChange | (isPlaying: boolean) => void | — | Callback fired whenever playback state toggles. |
| repeatMode | "off" | "all" | "one" | "off" | Repeat playback mode: 'off', repeat playlist/all ('all'), or repeat current track ('one'). Supports controlled or uncontrolled via defaultRepeatMode. |
| shuffle | boolean | false | Whether shuffle playback mode is enabled. Supports controlled or uncontrolled via defaultShuffle. |
| onRepeatModeChange | (mode: "off" | "all" | "one") => void | — | Callback triggered when clicking the repeat button. |
| onShuffleChange | (shuffle: boolean) => void | — | Callback triggered when clicking the shuffle toggle button. |
| onClose | () => void | — | Optional close handler for dismissing the floating player. |