CONTROL

Svg

Svg renders portable inline vector paths from one target-neutral Dowe source tree.

SVG TO DOWE

Convert vector source in the view

Paste SVG XML, run the view function, and copy the generated Svg and Path declarations.

SVG source
dowe

The importer maps distinct SVG fills to primary, secondary, tertiary, and the remaining semantic color tokens in encounter order.

dowe
signal svgSource value:"<svg viewBox='0 0 24 24'><path d='M4 4L20 4L12 20Z'/></svg>"
signal doweSvg value:""

fn convertSvg
  set doweSvg source:parse.svg value:svgSource fallback:""

Textarea bind:svgSource label:"SVG source" rows:12
Button onClick:convertSvg
  "Convert to Dowe"
Code language:"dowe" template:true content:"{doweSvg}"

AUTHORING CONTRACT

One surface, direct Path children

Svg requires a viewBox and one or more direct Path children. Path is structural and cannot be used outside Svg.

Svg prop
Accepted value
Default

No data

There are no records to display

Path prop
Accepted value
Default

No data

There are no records to display

dowe
Svg viewBox:"0 0 120 72" w:32 h:20
  Path d:"M0 0L48 0L48 48L0 48Z" fill:"primary" transform:"matrix(1 0 0 1 8 8)"
  Path d:"M56 0L104 24L56 48Z" fill:"secondary" transform:"matrix(1 0 0 1 8 8)"

PORTABLE SUBSET

Paths and affine matrices

parse.svg imports svg, g, and path elements plus matrix(...) transforms. It ignores unsupported drawing elements and never executes scripts, DTD, external entities, or user JavaScript.

Web emits inline SVG. Android draws the same path model on Canvas, and iOS renders it as SwiftUI paths while caching parsed geometry across drawing passes. Adjust w and h after conversion for the destination layout.