Import an SVG as Rive vector shapes
riv_import_svgTransform SVG files into professional Rive bezier shapes, outputting scene-fragment JSON for animation imports. Supports paths, gradients, strokes, nested transforms.
Instructions
Convert an SVG file (Figma/Illustrator export, icon, illustration) into Rive bezier path shapes — the professional way to get high-quality artwork instead of drawing with primitives. Writes a scene-fragment JSON (shapes with full cubic vertices, gradients, strokes) and returns a rendered preview. Use the fragment in riv_create via "imports". Supports path/rect/circle/ellipse/polygon/polyline/line, nested transforms, style attrs, linear/radial gradients. Not imported: (use texts[] with a font), , filters, masks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg | No | Inline SVG markup (alternative to svgPath) | |
| outSpec | Yes | Output scene-fragment JSON path (e.g. logo.scene.json) | |
| svgPath | No | Path to the .svg file | |
| idPrefix | No | Prefix for generated shape ids (avoid collisions) |