Skip to content
Data Display

Video Player

Native video wrapped in token-styled custom controls: seek, volume, playback speed, and fullscreen.

Import

tsx
import { VideoPlayer } from "@cronus-ui/ui";
bash
npx cronus-ui add video-player

Examples

API Reference

Generated from the component's exported types.

VideoPlayerProps

Extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof videoPlayerVariants>

Skip VideoPlayerProps props table
PropTypeDefaultDescription
src*
stringVideo source URL.
poster
stringPreview image shown before the first frame is available.
autoPlay
booleanfalseStarts playback automatically once the media can play.
loop
booleanfalseRestarts playback from the beginning when the video ends.
muted
booleanfalseStarts with the audio muted.
aspect
"video" | "square" | "wide""video"Frame aspect ratio: 16:9 (`"video"`), 1:1 (`"square"`) or 21:9 (`"wide"`).
labels
Partial<VideoPlayerLabels>Control-label overrides for i18n. Every label defaults to English.
videoRef
Ref<HTMLVideoElement>Ref to the underlying `<video>` element, for imperative control.
children
ReactNodeExtra media children, e.g. a captions `<track>` or additional `<source>` elements.