A video player component with playback controls. Supports RTL layout. Press play to preview the active playback state.
Loading demo: video-player-real-world
npx sdaia-ui@latest add video-player
import { VideoPlayer } from '@/components/ui/VideoPlayer';<VideoPlayer />Use surface="glass" to enable Glass Effect.
Loading demo: video-player-glass
Video player with playback controls. Press play to preview the active playback state.
Loading demo: video-player-default
Props for the VideoPlayer component.
Prop | Type | Default | Required |
|---|---|---|---|
poster | string | - | optional |
posterAlt | string | '' | optional |
title | string | - | optional |
playing | boolean | - | optional |
defaultPlaying | boolean | false | optional |
progress | number | - | optional |
defaultProgress | number | 0 | optional |
currentTime | string | '0:00' | optional |
duration | string | '0:00' | optional |
onPlay | () => void | - | optional |
onPause | () => void | - | optional |
onPrevious | () => void | - | optional |
onNext | () => void | - | optional |
onProgressChange | (value: number) => void | - | optional |
onVolumeClick | () => void | - | optional |
onSettingsClick | () => void | - | optional |
onFullscreenClick | () => void | - | optional |
onMoreClick | () => void | - | optional |
rtl | boolean | false | optional |
src | string | — | optional |
labels | Partial<VideoPlayerLabels> | English strings | optional |
How this component behaves at the three system breakpoints. Spacing and type tokens switch automatically at 768px and 1280px.
| Screen | Behavior |
|---|---|
| Desktop (1280px and up) | Fills the width of its container at a 16:9 ratio. |
| Tablet (768–1279px) | Same layout as desktop, with the tablet token values. |
| Phone (under 768px) | Same: the player scales with the screen width. |