Video player: Captions
Add a <track> and VideoPlayerCaptionsButton. Captions are drawn by the player, so they move up while the controls show instead of hiding behind them. A cross-origin track needs crossOrigin on the video.
This adds the example as components/examples/video-player/captions.tsx, together with the Video player component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/video-player-captions.jsonTo add only the component, follow the Video player installation.
See them all, with keyboard support and accessibility notes, on the Video player page.
- ButtonButtons in every variant and size, with a built-in loading, success and error flow that skips the spinner for fast requests.
- Dropdown menuA menu of actions and options behind a button, with groups, submenus, checkbox and radio items, and shortcuts.
- KbdKey caps for shortcuts that show the right symbols on every platform, read them out properly and press down with the real keys.
- MotionThe easing curves, durations and reduced-motion check every component animates with, plus hooks for size morphs and sliding highlights.
- SpinnerA loading indicator with Apple-style ticks or a breathing ring that can wait before showing and stay long enough not to flicker.
- TooltipA short hint on hover or keyboard focus that opens after a brief rest, switches instantly between neighbours and shows shortcuts.