• Returns a MotionValue each for scaleX and scaleY that update with the inverse of their respective parent scales.

    This is useful for undoing the distortion of content when scaling a parent component.

    By default, useInvertedScale will automatically fetch scaleX and scaleY from the nearest parent. By passing other MotionValues in as useInvertedScale({ scaleX, scaleY }), it will invert the output of those instead.

    const MyComponent = () => {
    const { scaleX, scaleY } = useInvertedScale()
    return <motion.div style={{ scaleX, scaleY }} />
    }

    Parameters

    • Optional scale: Partial<ScaleMotionValues>

    Returns ScaleMotionValues

    Deprecated

Generated using TypeDoc