Skip to content

ReferenceIcons

Icons

The SVG icon sets used by the packaged skins, as React components, SVG strings, and the media-icon element

The icons the packaged skins render. Skin source added with the Shadcn registry imports its icons from these modules, and your own controls can use them too.

Each icon is a React component that renders an inline <svg>.

Import

import { PlayIcon } from "@videojs/react/icons";

Icon sets

Three sets ship with the same icon names and different designs.

Set Module Used by
Default @videojs/react/icons The default skins, such as VideoSkin
Neutral @videojs/react/icons/neutral The neutral skins, such as NeutralVideoSkin
Compat @videojs/react/icons/compat The compat skins, such as CompatVideoSkin

Available icons

DefaultNeutralCompatExport
airplay-enter, default setairplay-enter, neutral setairplay-enter, compat setAirPlayEnterIcon
airplay-exit, default setairplay-exit, neutral setairplay-exit, compat setAirPlayExitIcon
captions-off, default setcaptions-off, neutral setcaptions-off, compat setCaptionsOffIcon
captions-on, default setcaptions-on, neutral setcaptions-on, compat setCaptionsOnIcon
cast-enter, default setcast-enter, neutral setcast-enter, compat setCastEnterIcon
cast-exit, default setcast-exit, neutral setcast-exit, compat setCastExitIcon
check, default setcheck, neutral setcheck, compat setCheckIcon
chevron, default setchevron, neutral setchevron, compat setChevronIcon
fullscreen-enter, default setfullscreen-enter, neutral setfullscreen-enter, compat setFullscreenEnterIcon
fullscreen-exit, default setfullscreen-exit, neutral setfullscreen-exit, compat setFullscreenExitIcon
gear, default setgear, neutral setgear, compat setGearIcon
pause, default setpause, neutral setpause, compat setPauseIcon
pip-enter, default setpip-enter, neutral setpip-enter, compat setPipEnterIcon
pip-exit, default setpip-exit, neutral setpip-exit, compat setPipExitIcon
play, default setplay, neutral setplay, compat setPlayIcon
quality, default setquality, neutral setquality, compat setQualityIcon
restart, default setrestart, neutral setrestart, compat setRestartIcon
seek, default setseek, neutral setseek, compat setSeekIcon
speech, default setspeech, neutral setspeech, compat setSpeechIcon
speed, default setspeed, neutral setspeed, compat setSpeedIcon
spinner, default setspinner, neutral setspinner, compat setSpinnerIcon
switches, default setswitches, neutral setswitches, compat setSwitchesIcon
volume-high, default setvolume-high, neutral setvolume-high, compat setVolumeHighIcon
volume-low, default setvolume-low, neutral setvolume-low, compat setVolumeLowIcon
volume-off, default setvolume-off, neutral setvolume-off, compat setVolumeOffIcon

Props

Icons accept IconProps, the standard SVG element props (SVGProps<SVGSVGElement>), and forward their ref to the <svg>. Props you pass override the defaults:

Attribute Default
width, height 18
viewBox 0 0 18 18
fill currentColor
aria-hidden true
import { PlayButton } from "@videojs/react";
import { PauseIcon, PlayIcon } from "@videojs/react/icons";

<PlayButton
  render={(props, state) => (
    <button {...props}>
      {state.paused ? <PlayIcon className="icon" /> : <PauseIcon className="icon" />}
    </button>
  )}
/>

Styling

Icons use fill="currentColor", so they take the text color of their parent. They are drawn on an 18×18 grid and render most sharply at 18px or a whole multiple, such as 36px.

.icon {
  width: 36px;
  height: 36px;
  color: white;
}

Accessibility

Every icon renders with aria-hidden="true". Give the surrounding control its accessible name. Built-in buttons, such as the play button, provide one automatically.