docs/components/input/VideoInput

VideoInput

Camera/video capture input.

import { VideoInput } from '@ybouhjira/hyperkit';

#Playground

Edit the code — the preview recompiles and re-renders as you type.

Live playground
Loading preview…

#Props

PropTypeDefaultDescription
valueFile | File[] | nullCurrently selected video file(s).
onChange *(files: File | File[] | null) => voidCallback when videos are selected or removed.
mode'single' | 'list''single'Selection mode: 'single' for one video, 'list' for multiple.
acceptstring'video/*'Accepted MIME types.
maxSizenumberMaximum file size in bytes.
placeholderstring'Select video'Placeholder text shown when no videos are selected.
disabledbooleanfalseDisable video selection.
classstringAdditional CSS classes.
onError(error: { type: 'validation' | 'format' | 'size' | 'corrupt'; message: string; file?: File; }) => voidCallback when a file validation or processing error occurs.
errorstringError message to display (controlled). When set, shows error state.

* required prop.

#Design Tokens

This component reads the following CSS custom properties. Override them globally or per-instance to restyle it — see the CSS Variables guide.

  • --sk-bg-secondary
  • --sk-bg-tertiary
  • --sk-border
  • --sk-color-danger
  • --sk-color-danger-bg
  • --sk-color-primary
  • --sk-color-primary-bg
  • --sk-color-text
  • --sk-error
  • --sk-font-size-base
  • --sk-font-size-sm
  • --sk-font-size-xs
  • --sk-radius-md
  • --sk-radius-sm
  • --sk-space-md
  • --sk-space-sm
  • --sk-space-xl
  • --sk-space-xs
  • --sk-text-secondary
  • --sk-video-input-bg
  • --sk-video-input-border
  • --sk-video-input-preview-height
  • --sk-video-input-preview-width
  • --sk-video-input-radius