PiPButton toggles picture-in-picture (PiP) mode. It detects platform support through an availability state — when PiP is "unsupported", the toggle does nothing.
Requires the
pip feature to be registered with the player.Import
Basic Usage
Custom Render
Props
Custom render prop. Receives the computed HTML props and current state.
Override the automatic
aria-label. By default: "Enter PiP" or "Exit PiP".Disables the button.
CSS class name or a function that receives state and returns a class name.
Inline style or a function that receives state and returns a style object.
State Data Attributes
| Attribute | Value / Description |
|---|---|
data-pip | Present when picture-in-picture mode is active. |
data-availability | "available" | "unavailable" | "unsupported" — platform support status. |
CSS Styling Example
Accessibility
Renders a<button> element. The aria-label updates automatically: "Enter PiP" or "Exit PiP". Keyboard activation: Enter / Space.