Full-featured audio player with waveform visualisation, playlist management, transport controls and a scoped-slot API.
Preview
Rendering the live preview…
expanded
Rendering the live preview…
compact
Rendering the live preview…
primary
Structure
Anatomy
Visual breakdown of the component's internal structure with BEM class call-outs.
Anatomy of <origam-audio> — 5 internal parts. The hidden <audio> element (⓪) drives state; the visual shell is a flex column: cover ①, metadata header ②, waveform ③, transport controller ④, optional playlist ⑤.
1.origam-audio__cover
Album cover image rendered as . 96 px in expanded, 48 px in compact.
2.origam-audio__header
Metadata strip: title, artist and album. Hidden when all three are absent.
3.origam-audio__waveform
Waveform visualiser — decoded peaks painted via SVG bars. Visible only when waveform prop is truthy.
4.origam-audio__controller
shell housing the transport row (play/pause, scrubber, volume, playback-rate menu).
5.origam-audio__playlist
Ordered list of tracks shown below the transport when playlist prop is set.
API
Props
All props accepted by this component, with their type, default value and description.
Imperative player methods: play(), pause(), seek(t), setVolume(v), setMuted(b), setPlaybackRate(r).
Customisation
CSS variables
CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.
Player surface background.
Default foreground color (text and icons).
Accent color driving scrubbers, play-button surface and active-loop pill.
Player container border color.
Player container border-radius.
Gap between header, waveform and controller sections.
Padding of the player container.
Cover image size in expanded variant. 48 px in compact.
Played waveform bar color.
Inclusion
Accessibility
ARIA roles, keyboard navigation and focus management. Sourced from the real component template.
ARIA roles
article
application
Keyboard interactions
Keyboard interactions
Key
Action
Space
Play / Pause toggle via the transport button.
Arrow Left / Right
Seek backward / forward on the scrubber slider.
Arrow Up / Down
Increase / decrease volume on the volume slider.
Tab
Navigate between transport controls.
Notes
Autoplay is suppressed when prefers-reduced-motion: reduce is set.
The waveform scrubber has aria-label="Seek" pointing to the useLocale translation.
When controls="native", the browser's native audio controls are used, which include keyboard support by default.
Foundation
Design tokens
Excerpt from this component's token declarations — the --origam-<component>---<property> variables, declared in its hand-maintained token sheet with no build step.
Source
color
var(--origam-color__surface---raised)
Player background.
color
var(--origam-color__action--primary---bg)
Accent color for scrubbers and the play button.
dimension
96px
Cover size in expanded variant.
dimension
48px
Play button size.
dimension
48px
Waveform visualiser height.
dimension
var(--origam-radius---lg)
Player container border-radius.
Interactive
Playground
Edit props live and see the component update in real time. The generated code snippet updates as you change values.
Rendering the live preview…
Usage
Examples
Ready-to-paste code snippets for your templates.
Basic player
vue
Playlist with loop
vue
Compact dock variant
vue
Ecosystem
Related elements
Components and directives from different folders that collaborate with this one.