# Installation

> Install pixi-silk with npm, pnpm, yarn or bun next to pixi.js v8. It needs WebGL2 and ships tree-shakeable ESM with TypeScript types, about 15 kB gzipped.

Source: https://pixi-silk.schmooky.dev/docs/installation/

pixi-silk is on npm. Its one peer dependency is `pixi.js` version 8.

```bash
npm install pixi-silk pixi.js
```

```bash
pnpm add pixi-silk pixi.js
```

```bash
yarn add pixi-silk pixi.js
```

```bash
bun add pixi-silk pixi.js
```

## Import

Import everything from the package root. The package is ESM only, with one file per module and
TypeScript declarations. CommonJS code can still `require()` it on Node 20.19+ and 22.12+. Your
bundler keeps only what you import, because the package is side-effect free. `SilkGraphics` with
its shader is about 15 kB gzipped. The motion helpers alone are under 0.5 kB.

```ts
import { createSilkApp, SilkGraphics, linear, conic } from 'pixi-silk';
```

## Requirements

- PixiJS 8.6 or newer. `pixi.js` is a peer dependency, so your app owns the renderer.
- WebGL2, which every current browser supports. The WebGPU renderer is not supported yet. Create
  your application with `preference: 'webgl'`. `createSilkApp` does this for you.
- Any bundler that understands ES modules (Vite, webpack, Rollup, esbuild, Parcel), or a
  `<script type="module">` with an import map.

## Without a bundler

```html
<script type="importmap">
  { "imports": {
      "pixi.js": "https://cdn.jsdelivr.net/npm/pixi.js@8/dist/pixi.min.mjs",
      "pixi-silk": "https://cdn.jsdelivr.net/npm/pixi-silk/dist/index.js"
  } }
</script>
<script type="module">
  import { createSilkApp, SilkGraphics } from 'pixi-silk';
</script>
```

Next, read the [quick start](/docs/quick-start/).
