Skip to content

createSvgPath

Read as Markdown

import { createSvgPath, Path } from "@pibbl/core";

SvgPathOptions is accepted by createSvgPath(options): Path2D, which returns a fresh Path2D from SVG path data. Browser parsing is authoritative; the function is pure and does not install rendering, interaction, or caching behavior.

<Path
style={{ d: createSvgPath({ d: "M10 10h80v50H10z" }), fill: "#38bdf8" }}
/>

See the SVG path live example.

Creates a Canvas Path2D for svg geometry from validated options.

createSvgPath: (options: Readonly<SvgPathOptions>) => Path2D

Related API: createSvgPath, SvgPathOptions.

A native Canvas path parsed from the supplied data.

SvgPathOptions

View source — packages/core/src/lib/geometry/svg-path.ts:22

Read the Drawing, layout, and effects companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.

Documentation built with @pibbl/core 0.0.2, revision 2dccb19. ALPHA — NOT FOR PRODUCTION USE.