Skip to content

Theming

vue-player exposes all visual properties as CSS custom properties. Override them on .vp-player or any parent element — no build step required.

Quick Example

css
.my-player {
  --vp-primary: #f97316;
  --vp-radius: 0px;
}
vue
<template>
  <VideoPlayer class="my-player" src="..." />
</template>

CSS Variables Reference

Brand

VariableDefaultDescription
--vp-primary#3dd68cAccent color — progress bar, active states
--vp-primary-hover#2ec97aAccent on hover
--vp-primary-active#24b86eAccent on press
--vp-primary-glowrgba(61,214,140,.2)Glow around scrubber thumb

Layout

VariableDefaultDescription
--vp-radius12pxOuter player corner radius
--vp-radius-sm8pxMenus corner radius
--vp-radius-xs6pxMenu items corner radius

Controls Bar

VariableDefaultDescription
--vp-controls-bggradientBottom gradient overlay behind controls
--vp-controls-padding12px 16px 14pxPadding inside the controls area
--vp-controls-gap6pxGap between control rows
--vp-controls-height44pxMin height of the controls row

Timeline

VariableDefaultDescription
--vp-timeline-height4pxTrack height at rest
--vp-timeline-height-hover6pxTrack height on hover
--vp-timeline-bgrgba(255,255,255,.18)Unfilled track color
--vp-timeline-bufferedrgba(255,255,255,.32)Buffered range color
--vp-timeline-progressvar(--vp-primary)Played range color
--vp-timeline-gap3pxGap between chapter segments

Scrubber Thumb

VariableDefaultDescription
--vp-thumb-size14pxDiameter of the drag handle
--vp-thumb-color#fffHandle fill color
--vp-thumb-shadowglowBox shadow (uses --vp-primary-glow)

Buttons

VariableDefaultDescription
--vp-button-size36pxClickable area of each icon button
--vp-button-hover-bgrgba(255,255,255,.1)Button hover background
--vp-icon-size18pxIcon size inside buttons

Typography

VariableDefaultDescription
--vp-font-familyinheritFont family
--vp-font-size13pxBase font size
--vp-font-size-sm11pxSmall labels (time, menu items)

Colors

VariableDefaultDescription
--vp-bg#000Player background
--vp-text-1#ffffffPrimary text
--vp-text-2rgba(255,255,255,.7)Secondary text
--vp-text-3rgba(255,255,255,.4)Muted text

Prebuilt Themes

Dark (default)

The default theme — dark background with green accent. No extra CSS needed.

Flat / Borderless

css
.my-player {
  --vp-radius: 0px;
  --vp-radius-sm: 4px;
  --vp-timeline-height: 3px;
  --vp-timeline-height-hover: 5px;
}

Custom Accent Color

Replace the primary color and its hover/active shades:

css
.my-player {
  --vp-primary:        #8b5cf6;
  --vp-primary-hover:  #7c3aed;
  --vp-primary-active: #6d28d9;
  --vp-primary-glow:   rgba(139, 92, 246, 0.22);
}

Scoped Styles in Vue SFC

vue
<style scoped>
:deep(.vp-player) {
  --vp-primary: #f97316;
  --vp-radius: 6px;
}
</style>

Released under the MIT License.