Themes

Ready-made looks inspired by popular video platforms, one import each.

The default look needs no theme. For something else, import a theme and put its class on the player. A theme is only CSS, so it changes the look and the layout and costs nothing until you import it. Every control and plugin keeps working the same way, including the keyboard and screen reader behaviour.

S1 E1The Green Coast
0:00−0:000:00

Usage

Import the theme after the main styles, then add its class.

tsx
import { defaultPlugins, VideoPlayer } from "react-video-kit/player";import "react-video-kit/styles.css";import "react-video-kit/themes/youtube.css";const plugins = defaultPlugins();<VideoPlayer className="rv-theme-youtube" src="/video.mp4" plugins={plugins} />;

The themes

Each theme's class is rv-theme- followed by its file name, such as rv-theme-disney for themes/disney.css.

ThemeImportThe look
YouTubethemes/youtube.cssA thin red timeline with a dot, over a flat row with the time as 0:41 / 16:53
Netflixthemes/netflix.cssThe time left beside a red timeline, large plain icons, and the title in the middle
Disney+themes/disney.cssThe title top left, and a small centred transport right above a thin blue timeline
Prime Videothemes/prime.cssThe title centred at the top, its buttons in the corner, and a large bare transport in the middle
HBO Maxthemes/max.cssThe title and the time left above a thin white timeline, with a small centred transport under it
Huluthemes/hulu.cssThe title over a white timeline, with the buttons running from the left under it
Vimeothemes/vimeo.cssA black play button beside a single dark bar, with a blue timeline
Twitchthemes/twitch.cssA purple timeline between its two times, over small round buttons, with a red LIVE pill
Spotifythemes/spotify.cssA large title, the times either side of the timeline, and a white circular play button
Udemythemes/udemy.cssA purple timeline over a dense row built for studying
TikTokthemes/tiktok.cssMade for vertical video: a bare column of icons, the name and caption in the corner, and a timeline on the edge
Instagramthemes/instagram.cssAlso for vertical video, with finer icons and a smaller name and caption
Minimalthemes/minimal.cssSlim, white, and on one line

These are inspired by each platform's public design. They use no logos, and they aren't made, endorsed by, or affiliated with those companies.

A theme arranges the controls your plugins provide, so its buttons come from those plugins: subtitles from captions, next and previous from playlist, and the episode list from episodes. Each one keeps the package's own icons. It names the platform's typeface first and falls back to a system font, since no fonts are included.

Use more than one

Each theme is scoped to its class, so several can share a page. To switch between them, change the class. The player keeps playing.

tsx
import "react-video-kit/themes/netflix.css";import "react-video-kit/themes/youtube.css";<VideoPlayer className={cinema ? "rv-theme-netflix" : "rv-theme-youtube"} src="/video.mp4" />;

Adjust a theme

Themes set the same tokens as the default skin, and they're in the same rv layer, so your own CSS still wins.

css
.rv-theme-youtube {  --rv-accent: #3ea6ff;  --rv-radius: 0;}

Write your own

Start from any selector the skin uses, and scope it to a class of your own. To move controls around, the themes in the package take the rows and groups out of the layout with display: contents, which makes every control a child of controls, and then place them with order.

css
.my-theme [data-part="controls"] {  flex-flow: row wrap;  align-content: flex-end;}.my-theme :is([data-part="control-row"], [data-part="control-group"], [data-part="transport"]) {  display: contents;}.my-theme [data-part="timeline"] {  flex: 0 0 100%;}

Read Parts for every data-part. If you need a structure CSS can't reach, compose the parts yourself.