JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 23
  • Score
    100M100P100Q75576F
  • License ISC

TS library for rendering tree objects into SVG.

Package Exports

  • tree2svg
  • tree2svg/svg
  • tree2svg/svg.js
  • tree2svg/types
  • tree2svg/types.js
  • tree2svg/utils
  • tree2svg/utils.js

Readme

svg-tree

A TypeScript library for rendering objects into SVG in a programmatic, object-oriented way. Build SVG graphics using simple, composable classes without dealing with raw XML strings.

Features

  • 🎯 Fully Typed: Written in TypeScript with complete type definitions
  • 🧩 Composable: Build complex SVG structures using simple, reusable components
  • 🎨 Rich Shapes: Support for rectangles, circles, paths, polygons, text and more
  • 🔧 Utilities: Helper functions for transformations, colors, and geometric calculations
  • 📦 Zero Dependencies: Pure TypeScript/JavaScript with no external dependencies
  • 🌐 Universal: Works in both browser and Node.js environments

Installation

npm install svg-tree

Quick Start

TODO

License

ISC

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.