# holst

> 2D graphic library

Latest version **1.7.26** (published 2025-05-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install holst
pnpm add holst
yarn add holst
bun add holst
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.7.26 |
| Published | 2025-05-27 |
| First published | 2022-07-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 371.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | m1hailostertag@gmail.com |
| Maintainers | m1sha |
| Keywords | 2d, graphic, animation, canvas, vector, svg |

## Links

- npm: https://www.npmjs.com/package/holst
- Repository: https://github.com/m1sha/holst
- Homepage: https://github.com/m1sha/holst#readme
- Issues: https://github.com/m1sha/holst/issues
- npm.io page: https://npm.io/package/holst

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.7.26 (latest) — 2025-05-27
- 1.7.25 — 2024-03-31
- 1.7.24 — 2024-03-31
- 1.7.23 — 2024-03-04
- 1.7.22 — 2024-01-23
- 1.7.21 — 2023-11-07
- 1.7.20 — 2023-11-07
- 1.7.19 — 2023-11-07
- 1.7.18 — 2023-09-20
- 1.7.17 — 2023-09-20
- 1.7.16 — 2023-08-09
- 1.7.15 — 2023-08-09
- 1.7.14 — 2023-07-26
- 1.7.13 — 2023-07-24
- 1.7.12 — 2023-06-13
- … 37 more at https://npm.io/package/holst/versions

## README

# Holst is 2D Graphic library

index.html
```html
<html>
  <body>
    <div id="app"></div>
  </body>
</html>
```

index.ts
```ts
import { Scene, DynamicRenderer2D, Color, Shape } from 'holst'

const scene = new Scene()
const forwardAnimation = scene.createAnimation({ duration: 1500 })
const backwardAnimation = scene.createAnimation({ duration: 1500 })
const layer = scene.createLayer()
const shape = Shape.create({ fill: Color.blue })
  .circle(400, 300, 150)
  .on('click', async () => {
    await forwardAnimation.play()
    await backwardAnimation.play()
  })
  .on('hover', e => (e.cursor = 'pointer'))
  .on('leave', e => (e.cursor = 'default'))
  
layer.add(shape)

forwardAnimation.action = ({ t }) => (
  shape.style.fill = Color.fromGradient(t, [Color.blue, Color.red])
)

backwardAnimation.action = ({ t }) => (
  shape.style.fill = Color.fromGradient(t, [Color.red, Color.blue])
)
  
const renderer = new DynamicRenderer2D({ width: 800, hight: 600 })
renderer.render(scene)

const app = document.getElementById('app')
app.append(renderer.element)
```

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