path-rite

reflectX

Mirror a path across the Y axis (negate all x coordinates).

reflectX(svgPath: string): string

svgPath — SVG path d-attribute string.

Returns — A new SVG path string mirrored horizontally across x = 0.

// Mirror a shape across the Y axis
const mirrored = pathRite.reflectX("M 10 0 L 50 0 L 50 50 Z");