Component docs
Loading
"use client";
import { MediaTransportControls } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
isPlaying (required) | boolean | — | — |
onPlayPause (required) | () => void | — | — |
forwardLabel | string | — | — |
nextLabel | string | — | — |
onForward | () => void | — | — |
onNext | () => void | — | — |
onPrevious | () => void | — | — |
onRestart | () => void | — | — |
onRewind | () => void | — | — |
previousLabel | string | — | — |
rewindLabel | string | — | — |
isPlayingrequiredboolean
onPlayPauserequired() => void
forwardLabelstring
nextLabelstring
onForward() => void
onNext() => void
onPrevious() => void
onRestart() => void
onRewind() => void
previousLabelstring
rewindLabelstring
Other props are passed to the root element (HTMLAttributes<HTMLDivElement>), including className, style, id and aria-* attributes.
const [playing, setPlaying] = useState(false);
<MediaTransportControls isPlaying={playing} onPlayPause={() => setPlaying(!playing)} />