PitchKit
API Reference@pitchkit/reactFunctions

usePitch()

function usePitch(): Pick<PitchContextValue, "dimensions" | "viewport" | "transform">;

Defined in: packages/react/src/use-pitch.ts:10

Imperative escape hatch: returns the enclosing <Pitch>/<VerticalPitch>'s dimensions, viewport, and pixel transform. Must be called from a descendant of <Pitch> — for advanced cases (custom marks, manual coordinate math) that the built-in layer components don't cover.

Returns

Pick<PitchContextValue, "dimensions" | "viewport" | "transform">

On this page