ClearPinButton
function ClearPinButton(__namedParameters): Element;Defined in: packages/react/src/components/controlbar/ClearPinButton.tsx:33
The ClearPinButton is a basic html button with the added ability to signal the LayoutContext that it should display the grid view again.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | ClearPinButtonProps |
Returns
Element
Example
// Basic — return from a pinned participant to grid view.
<VoiceRoom agent={agent}>
<ClearPinButton>Back to grid view</ClearPinButton>
</VoiceRoom>
// Advanced — combine focus layout with a clear-pin action.
function FocusedCall() {
const tracks = useTracks([Track.Source.Camera]);
const [focus] = tracks;
return (
<VoiceRoom agent={agent}>
<FocusLayout trackRef={focus} />
<ClearPinButton>Back to grid view</ClearPinButton>
</VoiceRoom>
);
}