DEV Community


Posted on

Neutralinojs: For lightweight, crossplatform applications


Portable and lightweight cross platform application development framework. Or you may think it like a lightweight Electron.

Getting the Starter Kit

Download Starter Kit (In docs, they call it SDK. I feel it like a Starter kit or Bootstrap) from github releases page ie. Download file.

Now extract it. It contains 2 folders (app:- where we write our UI code in html, js and css, storage: another folder) and 3 executables(1 each for Linux, Windows and Mac).

Code it

As I mentioned above we are going to add UI related logic in html, js and css. Open below files, and replace content as I mentioned.


<!DOCTYPE html>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/assets/app.css">
    <div id="neutralinoapp">
      <h1>Hello <span id="name"></span></h1>
    <script src="/neutralino.js"></script>
    <script src="/assets/app.js"></script>

Enter fullscreen mode Exit fullscreen mode


html, body{
    margin: 0px;
    padding: 0px;

#neutralinoapp {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #FFD700;

#neutralinoapp h1 {
    position: relative;
    float: left;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: Arial;
    font-size: 60px;
    padding: 0px;
    margin: 0px;
Enter fullscreen mode Exit fullscreen mode


var getUsername = function () {
    var key = NL_OS == 'Windows' ? 'USERNAME' : 'USER';
    Neutralino.os.getEnvar(key, function(data) {
        document.getElementById('name').innerText = data.value;
    function () {
        //handle error


    load: function () {
Enter fullscreen mode Exit fullscreen mode

Run it

Go to the folder, double click the executable corresponds to your OS. Mine was Linux (Debian). So, I opened neutralino-linux. A window was shown with Hello myusername.


Neutralinojs is a very simple and straight forward framework for building apps. In my case, my neutralino app was taking only 11MB of my RAM (I think, it takes around 30MB or 40MB for electronjs.).

Call for action

What do you think about this app ?
Do you find any alternative to this ?
Comment it below.


Top comments (0)