# node-gtk

> GNOME Gtk+ bindings for NodeJS

Latest version **4.1.1** (published 2026-07-04) · MIT license · 705 weekly downloads

## Install

```sh
npm install node-gtk
pnpm add node-gtk
yarn add node-gtk
bun add node-gtk
```

Provides the command `node-gtk`.

## Health

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

Positive: esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 4.1.1 |
| Published | 2026-07-04 |
| First published | 2015-12-17 |
| Weekly downloads | 705 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 800.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 578 |
| Author | Jasper St. Pierre |
| Maintainers | romgrk, webreflection |
| Keywords | GNOME, gobject-introspection, GObject, Gtk+, Gtk, cairo |

## Links

- npm: https://www.npmjs.com/package/node-gtk
- Repository: https://github.com/romgrk/node-gtk
- Homepage: https://github.com/romgrk/node-gtk#readme
- Issues: https://github.com/romgrk/node-gtk/issues
- npm.io page: https://npm.io/package/node-gtk

## Dependencies (8)

- [nan](https://npm.io/package/nan.md) ^2.27.0
- [node-gyp](https://npm.io/package/node-gyp.md) ^11.2.0
- [unindent](https://npm.io/package/unindent.md) ^2.0.0
- [lodash.isequal](https://npm.io/package/lodash.isequal.md) 4.5.0
- [lodash.camelcase](https://npm.io/package/lodash.camelcase.md) 4.3.0
- [lodash.snakecase](https://npm.io/package/lodash.snakecase.md) ^4.1.1
- [@mapbox/node-pre-gyp](https://npm.io/package/@mapbox/node-pre-gyp.md) ^2.0.3
- [remove-trailing-spaces](https://npm.io/package/remove-trailing-spaces.md) ^1.0.7

## Recent versions

- 4.1.1 (latest) — 2026-07-04
- 4.1.0 — 2026-07-03
- 4.0.1 — 2026-07-02
- 4.0.0 — 2026-07-01
- 3.0.0 — 2026-06-28
- 2.2.0 — 2026-06-19
- 2.1.0 — 2026-06-16
- 2.0.0 — 2026-06-14
- 1.0.0 — 2025-07-29
- 0.14.0 — 2024-03-15
- 0.13.0 — 2024-03-14
- 0.12.1 — 2024-02-17
- 0.12.0 — 2023-06-28
- 0.11.0 — 2022-07-14
- 0.10.0 — 2021-09-28
- … 33 more at https://npm.io/package/node-gtk/versions

## README

<p align="center">
    <a>
      <img
        alt="NODE-GTK"
        width="200"
        src="https://raw.githubusercontent.com/romgrk/node-gtk/master/img/node-gtk-logo.svg?sanitize=true"
      />
    </a>
</p>

<h1 align="center">node-gtk</h1>
<p align="center">
  <b>GTK bindings for NodeJS</b>
  <br/>
</p>

<p align="center">
  <a href="#usage">Usage</a> · <a href="#installing">Installing</a> · <a href="./doc/index.md">Documentation</a> · <a href="#contributing">Contributing</a>
</p>

<br />

`node-gtk` lets you build native GTK apps on **linux**, **macOS** and  **windows**
with full **ESM**, **TypeScript** and **CSS hot-reload** support. Prebuilt binaries 
are available for Node.js versions **22**, **24** and **26**.

<p align="center">
  <img src="./img/browser.png" style="max-width: 500px; height: auto;" alt="A web browser build with node-gtk" />
</p>

## Usage

The **create** tool generates a complete, ready-to-run GTK/Adwaita project, so you
can start building immediately after [installing GTK4](#installing):

```sh
npx node-gtk create <your-app>
```

<p align="center">
  <img src="./img/create-app-example.png" style="width: 500px; height: auto;"/>
</p>

Also see our [hello world](./examples/hello-world.mjs), [web browser](./examples/browser.mjs)
or [system monitor](./examples/system-monitor.mjs) examples.

## Installing

There are two steps:

1. Install `node-gtk` itself (*done by the create tool*)
2. Install the native libraries you use (see examples per platform below)

#### Linux

```sh
# archlinux
pacman -S gtk4 libadwaita

# fedora
dnf install gtk4 libadwaita

# ubuntu
# Already installed :)
```

#### macOS

```sh
brew install gtk4 libadwaita adwaita-icon-theme
```

#### Windows

```sh
# Already installed :)
```

> [!NOTE]
> Windows doesn't have the dependencies we need in a package manager, therefore
> `node-gtk` ships prebuilt versions of GTK 4 / Adwaita, so `npm install node-gtk`
> is all you need **if** your dependency is in our 
> [list of prebuilt libraries](./windows/runtime-libraries.txt).

### build from source

Building from source, or [contributing](./doc/contributing.md)? See [Building from source](./doc/building.md).

## Documentation

[Read our documentation here](./doc/index.md)

## Other notes

`node-gtk` is a [gobject-introspection](https://gi.readthedocs.io/en/latest) library 
for nodejs. It makes it possible to use any introspected C library, such as GTK, 
usable. It is similar in essence to [GJS](https://wiki.gnome.org/action/show/Projects/Gjs) 
or [PyGObject](https://pygobject.readthedocs.io).

[MIT License](./LICENSE)

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