Looking for the old docs? Go here

Display

Controls

This component creates a container for control groups and controls when to show them.

HTMLAttributes
Ref<HTMLElement>

This component creates a container for control groups.

import { Controls } from "@vidstack/react";

const Component = Controls.Root;
type Props = Controls.RootProps;
<Controls.Root>
  <Controls.Group></Controls.Group>
  <Controls.Group></Controls.Group>
<Controls.Root>
PropTypeDefault
asChild
boolean
false
children
ReactNode
null
hideDelay
number
2000
hideOnMouseLeave
boolean
false
CallbackType
onChange
function
/* Example. */
.component[data-foo] {}
NameDescription
data-visible
Whether controls should be visible.
data-pip
Whether picture-in-picture mode is active.
data-fullscreen
Whether fullscreen mode is active.
HTMLAttributes
Ref<HTMLElement>

This component creates a container for media controls.

import { Controls } from "@vidstack/react";

const Component = Controls.Group;
type Props = Controls.GroupProps;
<Controls.Root>
  <Controls.Group></Controls.Group>
  <Controls.Group></Controls.Group>
<Controls.Root>
PropTypeDefault
asChild
boolean
false
children
ReactNode
null

Previous