PitchKit
API Reference@pitchkit/reactInterfaces

PitchContextValue

Defined in: packages/react/src/context.ts:13

What usePitch() returns: the pitch's dimensions, viewport and pixel transform.

Properties

PropertyModifierTypeDescriptionDefined in
dimensionsreadonlyPitchDimensions-packages/react/src/context.ts:14
overlayreadonlyRefObject<HTMLDivElement | null>The HTML layer stacked over the pitch's <svg>, for marks that have to be HTML rather than SVG (<PlayerAvatar>). A ref, not state, so a pitch with no HTML marks never renders twice for it: current is null on the server and until the element mounts, and set by the time effects run.packages/react/src/context.ts:24
setTooltipreadonly(tooltip) => void-packages/react/src/context.ts:17
transformreadonlyPixelTransform-packages/react/src/context.ts:16
viewportreadonlyViewport-packages/react/src/context.ts:15

On this page