@nodegui/nodegui

A cross-platform library to build native desktop apps.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@nodegui/nodegui
8,702760.66.023 days ago5 years agoMinified + gzip package size for @nodegui/nodegui in KB

Readme

NodeGui
All Contributors JS Party #96 Build and Test status Discuss on GitHub
Build performant, native and cross-platform desktop applications with Node.js and CSS like styling.πŸš€
NodeGUI is powered by Qt6 πŸ’š which makes it CPU and memory efficient as compared to other chromium based solutions like Electron.
If you are looking for React based version, check out: React NodeGUI.
If you are looking for
Vue based version, check out: Vue NodeGUI.
If you are looking for
Svelte based version, check out: Svelte NodeGUI
Visit https://nodegui.github.io/nodegui for docs.
logo

How does it look?

demo<em>linux demo<em>win demo<em>mac

kitchendemo<em>macdemo</em>win

Code Examples

https://github.com/nodegui/examples

Features

  • 🧬 Cross platform. Works on major Linux flavours, Windows, and MacOS.
  • πŸ“‰ Low CPU and memory footprint. Current CPU stays at 0% on idle and memory usage is under 20MB for a Hello World program.
  • πŸ’… Styling with CSS (includes actual cascading). Also has full support for Flexbox layout (thanks to Yoga).
  • βœ… Complete Nodejs API support (Currently runs on Node v16.x - and is easily upgradable). Hence has access to all Nodejs compatible NPM modules.
  • πŸŽͺ Native widget event listener support. Supports all events available from Qt / NodeJs.
  • πŸ’Έ Can be used for Commercial applications.
  • πŸ•΅οΈβ€β™‚οΈ Good Devtools support.
  • πŸ“š Good documentation and website.
  • πŸ§™β€β™‚οΈ Good documentation for contributors.
  • πŸ¦ΉπŸ»β€β™€οΈ Good support for dark mode (Thanks to Qt).
  • πŸ…First class Typescript support. (Works on regular JS projects too πŸ˜‰).

Getting Started

Installation

To install latest stable release:
npm install @nodegui/nodegui

To install the latest version available on master branch:
npm install https://github.com/nodegui/nodegui/releases/download/v0.0.0-latest-master/nodegui-master.tgz

or a shorter version:
npm i http://master-release.nodegui.org

If the installation fails to download the Qt binaries, a mirror can be used by setting the following environment variable and running the install command again:
QT_LINK_MIRROR=<alternative domain> # eg. QT_LINK_MIRROR=https://qt-mirror.dannhauer.de

npm install @nodegui/nodegui

See FAQs
for more details.

Community guides

Talks/Podcasts


Docs for contributing

It is easier than you think, try it

Looking to contribute? If you wish to implement a new widget/add more features and need help understanding the codebase, you can start here: Contributing developer docs.
Please read https://github.com/nodegui/.github/blob/master/CONTRIBUTING.md

Building from source

This section is useful for those wanting to work on NodeGui itself.

Required tooling

NodeGui requires CMake and Compilation Tools as it is a wrapper for a native C++ widget toolkit QT. Detailed instructions here: https://www.sitepoint.com/build-native-desktop-gif-searcher-app-using-nodegui/
TL;DR:
MacOS
brew install cmake
brew install make

Windows
https://cmake.org/download/
Linux (Debian/Ubuntu)
sudo apt-get install pkg-config build-essential
sudo apt-get install cmake make
sudo apt-get install mesa-common-dev libglu1-mesa-dev

Linux (Fedora/RHEL/CentOS)
sudo dnf groupinstall "Development Tools" "Development Libraries"
sudo dnf groupinstall "C Development Tools and Libraries"
sudo dnf install mesa-libGL mesa-libGL-devel

Building

Once you have cloned this git repository, run this to build:
npm install
npm run build

The last step will takes some time to run as it builds the C++ binaries at the core of NodeGui.

Using your own custom Qt installation (Optional)

Compiling Qt from source
You will need to download and install Qt from source since there are no binaries from Qt for M1 yet.
(https://www.reddit.com/r/QtFramework/comments/ll58wg/howtobuildqtcreatorformacosarm64aguide/)
git clone git://code.qt.io/qt/qt5.git qt6
cd qt6
git checkout 6.6

./init-repository --module-subset=essential -f
git submodule init qtsvg
git submodule update qtsvg

cd ..
mkdir qt6-6.6-macOS-release
cd qt6-6.6-macOS-release

../qt6/configure -release QMAKE_APPLE_DEVICE_ARCHS=arm64 -opensource -confirm-license -nomake examples -nomake tests -skip qt3d -skip webengine -skip qtactiveqt -skip qtcanvas3d  -skip qtdeclarative -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtcharts -skip qtgraphicaleffects -skip qtlocation  -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtremoteobjects -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtvirtualkeyboard -skip qtscript

make -j15

make install

This should install Qt into something like this /usr/local/Qt-6.6.0 (your directory can change. This will be displayed when running make)
Pointing nodegui to use your custom Qt installation
Now just set export QT_INSTALL_DIR=<your qt path> . In the above example it would look something like this export QT_INSTALL_DIR=/usr/local/Qt-6.6.0. Add this in your .zshrc or .bashrc so that you dont need to repeat this process again.
Now just rm -rf node_modules and do npm install again.
The logs should say something like CustomQt detected at <your qt path>. Hence, skipping Mini Qt installation.

Running example programs

A number of small programs to show different parts of the Qt API are in src/examples. They can be run directly with:
npm run qode dist/examples/modelview_1_readonly.js

Updating docs

npm run docs
then followed by:
cd website && GIT_USER=<your_git_username> yarn deploy

Funding

NodeGui is an open source project and requires your support. If you like this project, please consider supporting my work by clicking on the Sponsor button on this Github repository or via Ko-Fi. Alternatively, Issues on NodeGui can be funded by anyone via Issuehunt and the amount will be distributed to respective contributors.

Buy Me a Coffee at ko-fi.com Β  Β issuehunt

Special Thanks

Code of Conduct

https://github.com/nodegui/.github/blob/master/CODEOFCONDUCT.md

License

MIT

Backers πŸš€

Thanks goes to these wonderful people.
<td align="center"><a href="https://github.com/yazla"><img src="https://avatars1.githubusercontent.com/u/681281?s=460&v=4" width="100px;" alt="Yuriy Yazlovytskyy"/><br /><sub><b>Yuriy Yazlovytskyy</b></sub></a></td>
<td align="center"><a href="https://github.com/johnsusek"><img src="https://avatars1.githubusercontent.com/u/611996?s=460&v=4" width="100px;" alt="John Susek"/><br /><sub><b>John Susek</b></sub></a></td>
 <td align="center"><a href="https://github.com/Spharax"><img src="https://avatars2.githubusercontent.com/u/2892381?s=460&v=4" width="100px;" alt="Marc Dijoux"/><br /><sub><b>Marc Dijoux</b></sub></a></td>
<td align="center"><a href="https://github.com/Qard"><img src="https://avatars2.githubusercontent.com/u/205482?s=460&v=4" width="100px;" alt="Stephen Belanger"/><br /><sub><b>Stephen Belanger</b></sub></a></td>
 <td align="center"><a href="https://github.com/irustm"><img src="https://avatars3.githubusercontent.com/u/16316579?s=460&v=4" width="100px;" alt="Rustam"/><br /><sub><b>Rustam</b></sub></a></td>

Maintainers ✨

People maintaining this project.
<td align="center"><a href="https://blog.atulr.com"><img src="https://avatars2.githubusercontent.com/u/4029423?v=4" width="100px;" alt="Atul R"/><br /><sub><b>Atul R</b></sub></a></td>
<td align="center"><a href="https://github.com/sedwards2009"><img src="https://avatars.githubusercontent.com/u/6926644?v=4" width="100px;" alt="Simon Edwards"/><br /><sub><b>Simon Edwards</b></sub></a></td>

Contributors ✨

Thanks goes to these wonderful people (emoji key):
<td align="center"><a href="https://lramage.gitlab.io"><img src="https://avatars1.githubusercontent.com/u/43783393?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Lucas Ramage</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=oxr463" title="Documentation">πŸ“–</a></td>
<td align="center"><a href="https://github.com/gamtiq"><img src="https://avatars3.githubusercontent.com/u/1177323?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Denis Sikuler</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=gamtiq" title="Documentation">πŸ“–</a></td>
<td align="center"><a href="https://twitter.com/nahueljo"><img src="https://avatars1.githubusercontent.com/u/1612488?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nahuel JosΓ©</b></sub></a><br /><a href="#question-Naahuel" title="Answering Questions">πŸ’¬</a></td>
<td align="center"><a href="https://github.com/kakulgupta"><img src="https://avatars3.githubusercontent.com/u/10727047?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kakul Gupta</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=kakulgupta" title="Code">πŸ’»</a></td>
<td align="center"><a href="http://rahulgaba.com"><img src="https://avatars3.githubusercontent.com/u/7898942?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rahul Gaba</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=rgabs" title="Code">πŸ’»</a></td>
<td align="center"><a href="http://uriziel.pl"><img src="https://avatars1.githubusercontent.com/u/568207?v=4?s=100" width="100px;" alt=""/><br /><sub><b>PaweΕ‚ Borecki</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=Uriziel01" title="Code">πŸ’»</a></td>
<td align="center"><a href="http://marcus-sa.me"><img src="https://avatars0.githubusercontent.com/u/8391194?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Marcus S. Abildskov</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=marcus-sa" title="Tests">⚠️</a></td>
<td align="center"><a href="http://www.mad3linux.org"><img src="https://avatars3.githubusercontent.com/u/508624?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Átila CamurΓ§a Alves</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=atilacamurca" title="Documentation">πŸ“–</a></td>
<td align="center"><a href="http://hibbard.eu"><img src="https://avatars2.githubusercontent.com/u/1940994?v=4?s=100" width="100px;" alt=""/><br /><sub><b>James Hibbard</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=jameshibbard" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/soonoo"><img src="https://avatars2.githubusercontent.com/u/5436405?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Soonwoo Hong</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=soonoo" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/illBeRoy"><img src="https://avatars2.githubusercontent.com/u/6681893?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Roy Sommer</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=illBeRoy" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/paulocoghi"><img src="https://avatars1.githubusercontent.com/u/378397?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Paulo Coghi</b></sub></a><br /><a href="#ideas-paulocoghi" title="Ideas, Planning, & Feedback">πŸ€”</a></td>
<td align="center"><a href="https://balthild.com"><img src="https://avatars2.githubusercontent.com/u/2662758?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Balthild Ires</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=balthild" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://dimitarnestorov.com"><img src="https://avatars0.githubusercontent.com/u/8790386?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dimitar Nestorov</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=dimitarnestorov" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://www.greatapes.fi"><img src="https://avatars3.githubusercontent.com/u/3404389?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mikko Sairio</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=msairio" title="Code">πŸ’»</a></td>
<td align="center"><a href="http://blog.pepf.nl"><img src="https://avatars1.githubusercontent.com/u/1265435?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Pepijn</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=pepf" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/slidinghotdog"><img src="https://avatars3.githubusercontent.com/u/33790211?v=4?s=100" width="100px;" alt=""/><br /><sub><b>slidinghotdog</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=slidinghotdog" title="Code">πŸ’»</a></td>
<td align="center"><a href="http://www.bundyo.org"><img src="https://avatars1.githubusercontent.com/u/98318?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bundyo (Kamen Bundev)</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=bundyo" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/feng8848"><img src="https://avatars2.githubusercontent.com/u/40539968?v=4?s=100" width="100px;" alt=""/><br /><sub><b>feng8848</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=feng8848" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://karelov.info"><img src="https://avatars3.githubusercontent.com/u/2384454?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Maksim Karelov</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=Ty3uK" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/mspencer92"><img src="https://avatars2.githubusercontent.com/u/1910455?v=4?s=100" width="100px;" alt=""/><br /><sub><b>mspencer92</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=mspencer92" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/blncd2020"><img src="https://avatars1.githubusercontent.com/u/59541979?v=4?s=100" width="100px;" alt=""/><br /><sub><b>blncd2020</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=blncd2020" title="Documentation">πŸ“–</a></td>
<td align="center"><a href="https://github.com/gluaxspeed"><img src="https://avatars2.githubusercontent.com/u/16431709?v=4?s=100" width="100px;" alt=""/><br /><sub><b>gluaxspeed</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=gluaxspeed" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/Solant"><img src="https://avatars2.githubusercontent.com/u/5971578?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Solant</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=Solant" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/shubhamzanwar"><img src="https://avatars0.githubusercontent.com/u/15626155?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Shubham Zanwar</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=shubhamzanwar" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/Singha360"><img src="https://avatars1.githubusercontent.com/u/35334787?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Singha360</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=Singha360" title="Code">πŸ’»</a></td>
<td align="center"><a href="http://wellenline.com"><img src="https://avatars3.githubusercontent.com/u/3790782?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mihkel</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=MihkelBaranov" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/stevo2588"><img src="https://avatars1.githubusercontent.com/u/3278045?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stephen A</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=stevo2588" title="Code">πŸ’»</a></td>
<td align="center"><a href="http://liujunjiang.com"><img src="https://avatars1.githubusercontent.com/u/15191056?v=4?s=100" width="100px;" alt=""/><br /><sub><b>桁君酱</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=jardenliu" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/agg23"><img src="https://avatars1.githubusercontent.com/u/238679?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Adam Gastineau</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=agg23" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/swittk"><img src="https://avatars2.githubusercontent.com/u/5000572?v=4?s=100" width="100px;" alt=""/><br /><sub><b>swittk</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=swittk" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/craftingmod"><img src="https://avatars2.githubusercontent.com/u/9389278?v=4?s=100" width="100px;" alt=""/><br /><sub><b>craftingmod</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=craftingmod" title="Code">πŸ’»</a></td>
<td align="center"><a href="http://www.m2osw.com"><img src="https://avatars1.githubusercontent.com/u/643129?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Doug Barbieri</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=dooglio" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/NeryHenrique"><img src="https://avatars0.githubusercontent.com/u/6879141?v=4?s=100" width="100px;" alt=""/><br /><sub><b>HENRIQUE DE SOUZA NERY</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=NeryHenrique" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://ruslang.xyz"><img src="https://avatars0.githubusercontent.com/u/25264730?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ruslan Garifullin</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=ruslang02" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/ran-j"><img src="https://avatars0.githubusercontent.com/u/17410205?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ranieri</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=ran-j" title="Code">πŸ’»</a> <a href="https://github.com/nodegui/nodegui/commits?author=ran-j" title="Documentation">πŸ“–</a></td>
<td align="center"><a href="https://master-technology.com"><img src="https://avatars3.githubusercontent.com/u/850871?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nathanael Anderson</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=NathanaelA" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://ubiq.co.za"><img src="https://avatars0.githubusercontent.com/u/4415071?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ross</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=rocbear" title="Code">πŸ’»</a> <a href="https://github.com/nodegui/nodegui/commits?author=rocbear" title="Documentation">πŸ“–</a></td>
<td align="center"><a href="https://github.com/4h7l"><img src="https://avatars.githubusercontent.com/u/69183283?v=4?s=100" width="100px;" alt=""/><br /><sub><b>4h7l</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=4h7l" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/Maks-s"><img src="https://avatars.githubusercontent.com/u/26678512?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Maks</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=Maks-s" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/zhb124404"><img src="https://avatars.githubusercontent.com/u/16805041?v=4?s=100" width="100px;" alt=""/><br /><sub><b>zhb124404</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=zhb124404" title="Documentation">πŸ“–</a></td>
<td align="center"><a href="http://www.apsis.io"><img src="https://avatars.githubusercontent.com/u/579688?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Wyatt Kirby</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=wkirby" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://stvkoch.github.io."><img src="https://avatars.githubusercontent.com/u/14454?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Steven Koch</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=stvkoch" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/sedwards2009"><img src="https://avatars.githubusercontent.com/u/6926644?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Simon Edwards</b></sub></a><br /><a href="https://github.com/nodegui/nodegui/commits?author=sedwards2009" title="Code">πŸ’»</a></td>



This project follows the all-contributors specification. Contributions of any kind welcome!