createSvgPath
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.
API details from source
Section titled “API details from source”
Creates a Canvas Path2D for svg geometry from validated options.
createSvgPath: (options: Readonly<SvgPathOptions>) => Path2DRelated API: createSvgPath, SvgPathOptions.
Parameters
Section titled “Parameters”options— SVG path data to parse. See SvgPathOptions.
Returns
Section titled “Returns”A native Canvas path parsed from the supplied data.
See also
Section titled “See also”View source — packages/core/src/lib/geometry/svg-path.ts:22
Implementation guidance for agents
Section titled “Implementation guidance for agents”Read the Drawing, layout, and effects companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.
Complete minimal examples
Section titled “Complete minimal examples”- Line and SVG paths: Construct a polyline and an SVG path from authored coordinates. Plain source
Documentation version
Section titled “Documentation version”Documentation built with @pibbl/core 0.0.2, revision 272a94a. ALPHA — NOT FOR PRODUCTION USE.