Electron framework lets you write cross-platform desktop applications using JavaScript, HTML and CSS.

Overview

Electron Logo

CircleCI Build Status AppVeyor Build Status Electron Discord Invite

πŸ“ Available Translations: πŸ‡¨πŸ‡³ πŸ‡§πŸ‡· πŸ‡ͺπŸ‡Έ πŸ‡―πŸ‡΅ πŸ‡·πŸ‡Ί πŸ‡«πŸ‡· πŸ‡ΊπŸ‡Έ πŸ‡©πŸ‡ͺ . View these docs in other languages at electron/i18n.

The Electron framework lets you write cross-platform desktop applications using JavaScript, HTML and CSS. It is based on Node.js and Chromium and is used by the Atom editor and many other apps.

Follow @ElectronJS on Twitter for important announcements.

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

Installation

To install prebuilt Electron binaries, use npm. The preferred method is to install Electron as a development dependency in your app:

npm install electron --save-dev

For more installation options and troubleshooting tips, see installation. For info on how to manage Electron versions in your apps, see Electron versioning.

Quick start & Electron Fiddle

Use Electron Fiddle to build, run, and package small Electron experiments, to see code examples for all of Electron's APIs, and to try out different versions of Electron. It's designed to make the start of your journey with Electron easier.

Alternatively, clone and run the electron/electron-quick-start repository to see a minimal Electron app in action:

git clone https://github.com/electron/electron-quick-start
cd electron-quick-start
npm install
npm start

Resources for learning Electron

Programmatic usage

Most people use Electron from the command line, but if you require electron inside your Node app (not your Electron app) it will return the file path to the binary. Use this to spawn Electron from Node scripts:

const electron = require('electron')
const proc = require('child_process')

// will print something similar to /Users/maf/.../Electron
console.log(electron)

// spawn Electron
const child = proc.spawn(electron)

Mirrors

Documentation Translations

Find documentation translations in electron/i18n.

Contributing

If you are interested in reporting/fixing issues and contributing directly to the code base, please see CONTRIBUTING.md for more information on what we're looking for and how to get started.

Community

Info on reporting bugs, getting help, finding third-party tools and sample apps, and more can be found in the support document.

License

MIT

When using the Electron or other GitHub logos, be sure to follow the GitHub logo guidelines.

Comments
  • Consider providing a build for Wayland

    Consider providing a build for Wayland

    • Electron version: any
    • Operating system: Linux

    Expected behavior

    Latest Ubuntu comes with Wayland a default display server. On embedded devices, wayland provides usually the best rendering performance, at least compared to X11 where the performance is usually pretty poor.

    Actual behavior

    Current linux / arm / arm64 binary releases are great but run pretty bad from my experience on embedded devices. They all link to libx11 / gtk which makes them unusable for wayland.

    libGtk can be build with --wayland-backend and then electron can be built against it

    I would really like electron team to consider providing prebuilt binaries usable with wayland, that would open a new range of possibilities, especially on embedded devices.

    enhancement :sparkles: platform/linux blocked/upstream ❌ 
    opened by LongChair 183
  • feat: Use GtkFileChooserNative to support the XDG Desktop Portal specification

    feat: Use GtkFileChooserNative to support the XDG Desktop Portal specification

    Description of Change

    With this commit, users on KDE/plasma will finally have support in Electron for their native file chooser dialogs. Fixes #2911.

    Checklist

    Release Notes

    Notes: Added support for alternative file choosers on Linux through the usage of the XDG Desktop Portal in GtkFileChooserNative.

    This PR is backwards compatible to support platforms like Ubuntu 16.04/14.04 whose GTK versions are less than 3.20.

    semver/minor api-review/requested πŸ—³ 
    opened by tristan957 177
  • The SUID sandbox helper binary was found, but is not configured correctly

    The SUID sandbox helper binary was found, but is not configured correctly

    Preflight Checklist

    • [x] I have read the Contributing Guidelines for this project.
    • [x] I agree to follow the Code of Conduct that this project adheres to.
    • [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

    Issue Details

    • Electron Version:
      • 5.0.0
    • Operating System:
      • Arch Linux x64
    • Last Known Working Electron version::
      • 4.1.5

    Expected Behavior

    Running node_modules/.bin/electron --version should output v5.0.0.

    To be clear, all commands create this error, but I'm using the --version flag for simplicity.

    Actual Behavior

    $ node_modules/.bin/electron --version
    [2720:0425/142001.775056:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/christianbundy/src/ssbc/patchwork/node_modules/electron/dist/chrome-sandbox is owned by root and has mode 4755.
    

    Additional Information

    $ stat /home/christianbundy/src/ssbc/patchwork/node_modules/electron/dist/chrome-sandbox
      Size: 5185424   	Blocks: 10128      IO Block: 4096   regular file
    Device: 802h/2050d	Inode: 1465270     Links: 1
    Access: (0755/-rwxr-xr-x)  Uid: ( 1000/christianbundy)   Gid: ( 1000/christianbundy)
    Access: 2019-04-25 14:15:10.609279524 -0700
    Modify: 2019-04-25 14:15:10.659278929 -0700
    Change: 2019-04-25 14:15:10.659278929 -0700
     Birth: 2019-04-25 14:15:10.609279524 -0700
    

    If I chown and chmod the file then it works fine, but my intuition is that npm install electron@latest should work without those commands. Is this expected behavior?

    discussion platform/linux 5-0-x 
    opened by christianbundy 155
  • Mac App Store Private API Rejection: Electron 5.0.10

    Mac App Store Private API Rejection: Electron 5.0.10

    Issue Details

    • Electron Version: 5.0.10

    Rejection Email

    ITMS-90338: Non-public API usage - The app contains or inherits from non-public classes in Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework: CAContext, CALayerHost, NSAccessibilityRemoteUIElement, NSNextStepFrame, NSThemeFrame, NSURLFileTypeMappings . If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/

    bug :beetle: app-store 5-0-x 7-0-x 6-1-x 7-1-x 
    opened by thomasdao 143
  • Notification API do not work with Windows 10 16299.19 (fall creators update)

    Notification API do not work with Windows 10 16299.19 (fall creators update)

    • Electron version: 1.7.8
    • Operating system: Windows 10 16299.19 - latest update

    Expected behavior

    Create a desktop notifications.

    Actual behavior

    No notification.

    How to reproduce

    Try with yours https://github.com/electron/electron-api-demos

    platform/windows bug :beetle: component/notifications 
    opened by GregorBiswanger 124
  • Transparent window has white background window

    Transparent window has white background window

    Hi, I've some issue with the transparent window, my code is:

    win = new BrowserWindow({
      width: 100,
      height: 50,
      transparent: true,
      frame: false
    });
    

    On Mac I have not any kind of problem, on my Windows 7 Parallels virtual machine again no problem, but on another pc (not virtualized) with Windows 7 transparent windows doesn't work (I have a white background).

    I haven't error logs from console. In both Windows 7 machines I have DWM enabled and running (in fact, both are using aero).

    status/wontfix 🚫 
    opened by delvedor 114
  • Mojave dark mode causes a white line at the top of Electron apps

    Mojave dark mode causes a white line at the top of Electron apps

    • Electron Version: ???
    • Operating System (Platform and Version): macOS 10.14 Mojave
    • Last known working Electron version: ???

    Expected Behavior No white lines

    Actual behavior There is a thin white line at the top border of Discord

    To Reproduce Download Discord and run.

    Screenshots image

    Additional Information May be related to dark theme.


    I am aware macOS Mojave is not exactly accessible to everyone yet, but I'm reporting this just in case.

    platform/macOS bug :beetle: 
    opened by LoganDark 111
  • Electron broken on OS X in Apple Sandboxed apps (App Store)

    Electron broken on OS X in Apple Sandboxed apps (App Store)

    :apple: Not sure if this is related to the Chromium itself. I've been trying and successfully packed and signed my app, but still there are logs in console like:

    12/19/15 9:45:14.000 PM kernel[0]: Sandbox: Electron Helper(15181) deny(1) mach-lookup org.chromium.Chromium.rohitfork.15175
    12/19/15 9:45:14.000 PM kernel[0]: Sandbox: Electron Helper(15181) deny(1) mach-lookup org.chromium.Chromium.iosurfacemgr.15175
    12/19/15 9:45:15.520 PM sandboxd[326]: ([15176]) Electron Helper(15176) deny mach-lookup org.chromium.Chromium.rohitfork.15175
    12/19/15 9:45:15.574 PM sandboxd[326]: ([15176]) Electron Helper(15176) deny mach-lookup org.chromium.Chromium.iosurfacemgr.15175
    12/19/15 9:45:15.926 PM sandboxd[326]: ([15177]) Electron Helper(15177) deny mach-lookup org.chromium.Chromium.rohitfork.15175
    12/19/15 9:45:15.958 PM sandboxd[326]: ([15177]) Electron Helper(15177) deny mach-lookup org.chromium.Chromium.iosurfacemgr.15175
    12/19/15 9:45:16.742 PM sandboxd[326]: ([15178]) Electron Helper(15178) deny mach-lookup org.chromium.Chromium.rohitfork.15175
    12/19/15 9:45:16.773 PM sandboxd[326]: ([15178]) Electron Helper(15178) deny mach-lookup org.chromium.Chromium.iosurfacemgr.15175
    12/19/15 9:45:16.946 PM sandboxd[326]: ([15180]) Electron Helper(15180) deny mach-lookup org.chromium.Chromium.rohitfork.15175
    12/19/15 9:45:16.977 PM sandboxd[326]: ([15180]) Electron Helper(15180) deny mach-lookup org.chromium.Chromium.iosurfacemgr.15175
    

    The following extract from my entitlements doesn't seem work work. I guess that Wildcards may not be accepted; however, the * bits keep changing every time I execute the application.

    <key>com.apple.security.temporary-exception.mach-lookup.global-name</key>
    <array>
      <string>org.chromium.Chromium.rohitfork.*</string>
      <string>org.chromium.Chromium.iosurfacemgr.*</string>
    </array>
    

    May there be any fixes on this in future releases? P.S.: I've found that the sandboxed app runs much slower and has some issues (like jittering graphics, the best way I could describe it). Again, I guess it is related to the denials from sandboxing. Thanks!

    platform/macOS 
    opened by sethlu 109
  • Upgrade to Chromium 59

    Upgrade to Chromium 59

    Instead of #9766.

    Failing tests:

    • [x] [Windows] BrowserWindow module "webPreferences" option "sandbox" option can print to PDF
    • [x] [Windows] BrowserWindow module window states resizable state works for a frameless window

    Both failing tests were disabled Tasks to fix them: #10279, #10280.

    opened by alexeykuzmin 103
  • Consider replacing GTK2 w GTK3 in Linux builds

    Consider replacing GTK2 w GTK3 in Linux builds

    Google recently added a "use_gtk3" build flag to Chormium - export GYP_DEFINES="$GYP_DEFINES use_gtk3=1"ο»Ώ.

    I think most end-users on GTK3 desktops would prefer to use modern widgets. It might be too early to add it as a default, but eventually it be nice.

    Video of Chromium 47 w gtk3: https://www.youtube.com/watch?v=TJidbdaHCYc

    This somewhat relates to an old issue I opened up: https://github.com/atom/electron/issues/765

    enhancement :sparkles: platform/linux 
    opened by nikolowry 100
  • Horizontal Scroll Issue

    Horizontal Scroll Issue

    Coming from VS Code where they have identified electron as the issue. https://github.com/microsoft/vscode/issues/56964

    MX Master mouse horizontal scroll does not work or works intermittently.

    platform/windows blocked/upstream ❌ 7-0-x 10-x-y 11-x-y 12-x-y 
    opened by gaby64 95
  • [Feature Request]: It is very necessary to have an event that the mouse moves out of the window

    [Feature Request]: It is very necessary to have an event that the mouse moves out of the window

    Preflight Checklist

    Problem Description

    I have a requirement, when the cursor moves out of the window, the window is automatically hidden, but electron does not have the event of the cursor moving out of the window, and mousemove using hookWindowMessage is also invalid, webcontents will eat hookWindowMessage, so an event is very much needed when the cursor moves out of the window .

    Proposed Solution

    Add cursor out of window event

    Alternatives Considered

    none

    Additional Information

    No response

    enhancement :sparkles: 
    opened by fanchenio 0
  • [Bug]: Printing bing.com site fails since Electron 22

    [Bug]: Printing bing.com site fails since Electron 22

    Preflight Checklist

    Electron Version

    22.0.0

    What operating system are you using?

    Windows

    Operating System Version

    Windows 10

    What arch are you using?

    x64

    Last Known Working Electron version

    21.0.0

    Expected Behavior

    I expect to be able to print the bing site to a PDF printer

    Actual Behavior

    print callback resolves when selecting the printer with the "Print job failed" failure reason, presumably from here

    Testcase Gist URL

    https://gist.github.com/2eb2b9fdfdd0479f67b2451c4da7083a

    Additional Information

    run the gist, select the Microsoft PDF printer, observe the error dialog

    The print callback runs before the OpenFile dialog displays

    bug :beetle: 
    opened by pushkin- 1
Releases(v23.0.0-alpha.3)
Owner
Electron
Build cross platform desktop apps with JavaScript, HTML, and CSS
Electron
Build performant, native and cross-platform desktop applications with Node.js and CSS like styling. πŸš€

NodeGui Build performant, native and cross-platform desktop applications with Node.js and CSS like styling. ?? NodeGUI is powered by Qt5 ?? which make

NodeGui 8.1k Dec 30, 2022
RmlUi - The HTML/CSS User Interface library evolved

RmlUi - The HTML/CSS User Interface Library Evolved RmlUi - now with added boosters taking control of the rocket, targeting your games and application

Michael R. P. Ragazzon 1.6k Jan 7, 2023
wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls.

About wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls. wxWidgets allows y

null 4.8k Jan 7, 2023
A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs.

webview for golang and c/c++ A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. The goal of the project is to

polevpn 21 Dec 3, 2022
A small C library for building user interfaces with C, XML and CSS

LCUI A small C library for building user interfaces with C, XML and CSS. Table of contents Table of contents Introduction Features Screenshots Related

Liu 3.9k Dec 27, 2022
Lets try out a few ways to easily create a modern Win32 UI app

UI-Experiments Lets try out a few ways to easily create a modern Win32 UI app This is a VS2019 solution with a handful of single projects, each one tr

Tammo 'kb' Hinrichs 21 Dec 6, 2021
Neutralinojs is a lightweight and portable desktop application development framework

Neutralinojs is a lightweight and portable desktop application development framework. It lets you develop lightweight cross-platform desktop applications using JavaScript, HTML and CSS.

Neutralinojs 6.3k Dec 30, 2022
Purely native C++ cross-platform GUI framework for Android and iOS development. https://www.boden.io

BODEN CROSS-PLATFORM FRAMEWORK Build purely native cross-platform experiences with Boden Website ⬑ Getting Started ⬑ API Reference ⬑ Guides ⬑ Twitter

Ashampoo Systems GmbH & Co KG 1.6k Dec 27, 2022
U++ is a C++ cross-platform rapid application development framework focused on programmer's productivity. It includes a set of libraries (GUI, SQL, Network etc.), and integrated development environment (TheIDE).

Ultimate++ Ultimate++ is a C++ cross-platform rapid application development framework focused on programmers productivity. It includes a set of librar

Ultimate++ 564 Jan 8, 2023
The HorusUI library allows you to quickly develop GUIs for your applications by leveraging the ease of use provided by immediate mode GUI concepts.

Immediate Mode Graphical User Interface for Tools OVERVIEW The HorusUI library allows you to quickly develop GUIs for your applications by leveraging

null 133 Dec 12, 2022
Free open-source modern C++17 / C++20 framework to create console, forms (GUI like WinForms) and unit test applications on Microsoft Windows, Apple macOS and Linux.

xtd Modern C++17/20 framework to create console (CLI), forms (GUI like WinForms) and tunit (unit tests like Microsoft Unit Testing Framework) applicat

Gammasoft 441 Jan 4, 2023
A minimalist andf platform-agnostic application layer for writing graphical applications, with a strong emphasis on simplicity and ease of use.

SlimApp A minimalist(*) and platform-agnostic application layer for writing graphical applications. Available as either a single header file or a dire

Arnon Marcus 34 Dec 18, 2022
Radio.Garden desktop app and game overlay

Radio.Garten A radio.garden desktop client and overlay written with SDL2 and ImGui Overlay Example Overlay Compatibility Please check the compatibilit

null 12 Dec 8, 2022
AirPods desktop user experience enhancement program

AirPodsDesktop AirPods desktop user experience enhancement program

Sprite 381 Jan 5, 2023
Modern Window Sitter for X11 based Desktop Environments

Modern Window Sitter for X11 based Desktop Environments (Coming to Wayland, Windows and Mac soon-ish). But using with a terminal emulator is recommended.

Antony Jr 40 Nov 30, 2022
Lagrange is a desktop GUI client for browsing Geminispace.

Lagrange is a desktop GUI client for browsing Geminispace. It offers modern conveniences familiar from web browsers, such as smooth scrolling, inline image viewing, multiple tabs, visual themes, Unicode fonts, bookmarks, history, and page outlines.

Jaakko KerΓ€nen 954 Jan 1, 2023
Tiny cross-platform webview library for C/C++/Golang. Uses WebKit (Gtk/Cocoa) and Edge (Windows)

A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. Also, there are Rust bindings, Python bindings, Nim bindings, Haskell, C# bindings and Java bindings available.

webview 10.8k Jan 9, 2023
A single-header ANSI C immediate mode cross-platform GUI library

Nuklear This is a minimal-state, immediate-mode graphical user interface toolkit written in ANSI C and licensed under public domain. It was designed a

Immediate Mode UIs, Nuklear, etc. 6.7k Dec 24, 2022
A library for creating native cross-platform GUI apps

Yue A library for creating native cross-platform GUI apps. Getting started Documentations FAQ Development Examples Sample apps (with screenshots) Muba

Yue 2.8k Jan 7, 2023