Programmable SVG design library for Go.
Alolyte lets you compose high-quality, reusable, and animated SVG graphics using code β no GUI, no raw XML editing, just Go.
It sits between "hand-edit SVG by hand" and "use Figma" β a code-first design runtime for developers who want programmable, composable visuals.
In Development. The core runtime is in place. Widgets, CLI, and animations are coming in v0.1.
Widget β Instance β Document β SVG file
(SVG file) (placed on (the canvas)
canvas with
transforms
+ params)
Widget β a reusable .svg file with Go text/template variables for parameterization.
Instance β a widget placed at a position on the canvas, with scale, rotation, and param overrides.
Document β the canvas. Holds all instances and exports the final composed SVG.
canvas := doc.NewDocument(800, 600).WithBackground("#0f0f1a")
bg, _ := widget.Load("assets/widgets/aurora_background.svg")
orb, _ := widget.Load("assets/widgets/gradient_orb.svg")
canvas.Add(instance.At(bg, 0, 0,
instance.WithParams(instance.Params{
"ID": "bg", "ColorA": "#6366f1", "ColorB": "#ec4899",
}),
))
canvas.Add(instance.At(orb, 200, 100,
instance.WithScale(1.4),
instance.WithParams(instance.Params{
"ID": "orb1", "PrimaryColor": "#ffffff", "SecondaryColor": "#a78bfa",
}),
))
canvas.Export("output.svg")Widget SVGs use Go template syntax for parameters:
<stop offset="0%"
stop-color="{{if .PrimaryColor}}{{.PrimaryColor}}{{else}}#a78bfa{{end}}"/>alolyte/
βββ doc/ # Document β canvas, composition, export
βββ widget/ # Widget β SVG loader, template renderer, registry
βββ instance/ # Instance β placement, transforms, param overrides
βββ assets/
β βββ widgets/ # Built-in SVG widgets (coming in v0.1)
βββ examples/ # Usage examples
-
widgetβ SVG file loader with Go template param support -
widgetβ Registry to scan and index a widgets folder -
instanceβ Placement with position, scale, rotation, params -
docβ Document canvas withAdd,Render,Export - Tests for all three packages
- Built-in widget collection (
gradient_orb,aurora_background,geometric_ring,glow_text,noise_texture) - Example usage in
examples/folder - CLI:
alolyte list,alolyte preview,alolyte render,alolyte new - Terminal image preview via Charm Mosaics
- First real example output β animated logo mark
- Widget manifest (
widget.yaml) β metadata, param schema, preview thumbnail -
alolyte pull <pack>β widget packs from GitHub - Animation props (delay, duration, easing as params)
- DSL syntax sugar for common composition patterns
See CONTRIBUTING.md.
MIT Β© leraniode
Part of Leraniode β Building Tools that feel alive π±.