Video Player
An on-demand video player built on Video.js 10, with the skin themed by the shadcn/ui tokens, a composable media element and declarative text tracks.
The shell is the Video.js video preset and its skin; the media element is a separate component, so the shell never needs to change when the source does. The skin only exposes its published settings, and Blocove sets them from your shadcn/ui tokens: radius, hairline, font and scale follow theme changes, while the accent keeps the contrasting default unless you pass `accentColor`.
Preview

Installation
Add the item with the shadcn CLI, or copy the source manually.
pnpm dlx shadcn@latest add litingyes/blocove/video-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/video-player
API Reference
Props accepted by the exported components.
VideoPlayer
The on-demand video preset and its skin, themed with the shadcn/ui tokens. Compose the media inside it. The player element renders nothing itself, so the classic shadcn attributes (`className`, `style`, `children`) belong to this component.
| Prop | Type | Default |
|---|---|---|
title | string | null | - |
poster | string | null | - |
aspectRatio | 'video' | 'classic' | 'square' | 'portrait' | 'wide' | 'auto' | 'video' |
accentColor | string | Skin default |
objectFit | 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' | Skin default |
objectPosition | string | Skin default |
renderPoster | (props) => ReactNode | - |
className | string | - |
style | CSSProperties | - |
children | ReactNode | Required |
VideoMedia
The native `<video>` element. It registers itself as the player's media on mount and forwards every native attribute, so `autoPlay`, `muted`, `loop` and the media events work as usual.
| Prop | Type | Default |
|---|---|---|
src | string | - |
tracks | MediaTrack[] | - |
playsInline | boolean | true |
preload | 'none' | 'metadata' | 'auto' | 'metadata' |
...props | VideoHTMLAttributes<HTMLVideoElement> | - |
MediaTrack
One text track. Captions are the default kind, and the same declarations feed the video and audio media components.
| Prop | Type | Default |
|---|---|---|
src | string | Required |
label | string | Required |
srcLang | string | Required |
kind | 'captions' | 'subtitles' | 'descriptions' | 'chapters' | 'metadata' | 'captions' |
default | boolean | - |