# @lona/svg-model

> ![](./docs/logo.png)

Latest version **3.0.0-alpha.11** (published 2025-12-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @lona/svg-model
pnpm add @lona/svg-model
yarn add @lona/svg-model
bun add @lona/svg-model
```

Provides the command `svg-model`.

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.0.0-alpha.11 |
| Published | 2025-12-08 |
| First published | 2019-03-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 174.9 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | dabbott, mathieudutour |

## Links

- npm: https://www.npmjs.com/package/@lona/svg-model
- npm.io page: https://npm.io/package/@lona/svg-model

## Dependencies (8)

- [svgo](https://npm.io/package/svgo.md) ^1.3.2
- [svgson](https://npm.io/package/svgson.md) ^4.0.0
- [svgpath](https://npm.io/package/svgpath.md) ^2.2.3
- [element-to-path](https://npm.io/package/element-to-path.md) ^1.2.0
- [lodash.camelcase](https://npm.io/package/lodash.camelcase.md) ^4.3.0
- [csscolorparser-ts](https://npm.io/package/csscolorparser-ts.md) ^1.1.1
- [lodash.upperfirst](https://npm.io/package/lodash.upperfirst.md) ^4.3.1
- [svg-transform-parser](https://npm.io/package/svg-transform-parser.md) ^0.0.1

## Recent versions

- 3.0.0-alpha.11 (latest) — 2025-12-08
- 3.0.0-alpha.10 — 2021-07-16
- 3.0.0-alpha.9 — 2021-07-16
- 3.0.0-alpha.8 — 2021-07-16
- 3.0.0-alpha.7 — 2021-07-16
- 3.0.0-alpha.6 — 2021-07-16
- 3.0.0-alpha.5 — 2021-07-16
- 3.0.0-alpha.4 — 2021-07-14
- 3.0.0-alpha.3 — 2020-05-02
- 3.0.0-alpha.1 — 2020-04-27
- 2.1.0 — 2020-04-26
- 2.0.0 — 2020-04-21
- 1.0.4 — 2020-01-19
- 1.0.3 — 2019-03-11
- 1.0.2 — 2019-03-11
- … 2 more at https://npm.io/package/@lona/svg-model/versions

## README

![](./docs/logo.png)

# SVG Model

A simplified model to represent SVGs for drawing on a 2D canvas. This is useful when building an SVG renderer.

## How it works

All SVG elements are converted to a flat list of paths. Group attributes (e.g. styles, transforms) are already applied to each path. Paths are simplified to the minimal set of commands needed for accurate drawing.

---
_Source: https://npm.io/package/@lona/svg-model · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
