FullscreenButton toggles fullscreen mode. It detects platform support through an availability state — when fullscreen is "unsupported", the toggle does nothing.
Requires the
fullscreen 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 fullscreen" or "Exit fullscreen".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-fullscreen | Present when in fullscreen mode. |
data-availability | "available" | "unavailable" | "unsupported" — platform support status. |
CSS Styling Example
Accessibility
Renders a<button> element. The aria-label updates automatically: "Enter fullscreen" or "Exit fullscreen". Keyboard activation: Enter / Space.