OPEN-UI

Webcam

A webcam component that streams the user's camera with configurable resolution and optional audio. Supports ref forwarding and shows an error message when camera access fails.

Allow camera access to see preview

Install

Use Open-UI CLI or Shadcn CLI to install the component.

Open-UI CLI

Shadcn CLI

Usage

PropDefaultDescriptionType
width640Video width in pixels.number
height360Video height in pixels.number
audiofalseWhether to request the microphone stream.boolean
classNameAdditional CSS class for the <video> element.string
containerClassNameAdditional CSS class for the outer container.string

Related Components