1 | [![Electron Logo](https://electronjs.org/images/electron-logo.svg)](https://electronjs.org)
|
2 |
|
3 | [![GitHub Actions Build Status](https://github.com/electron/electron/actions/workflows/build.yml/badge.svg)](https://github.com/electron/electron/actions/workflows/build.yml)
|
4 | [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/4lggi9dpjc1qob7k/branch/main?svg=true)](https://ci.appveyor.com/project/electron-bot/electron-ljo26/branch/main)
|
5 | [![Electron Discord Invite](https://img.shields.io/discord/745037351163527189?color=%237289DA&label=chat&logo=discord&logoColor=white)](https://discord.gg/electronjs)
|
6 |
|
7 | :memo: Available Translations: π¨π³ π§π· πͺπΈ π―π΅ π·πΊ π«π· πΊπΈ π©πͺ.
|
8 | View these docs in other languages on our [Crowdin](https://crowdin.com/project/electron) project.
|
9 |
|
10 | The Electron framework lets you write cross-platform desktop applications
|
11 | using JavaScript, HTML and CSS. It is based on [Node.js](https://nodejs.org/) and
|
12 | [Chromium](https://www.chromium.org) and is used by the
|
13 | [Visual Studio Code](https://github.com/Microsoft/vscode/) and many other [apps](https://electronjs.org/apps).
|
14 |
|
15 | Follow [@electronjs](https://twitter.com/electronjs) on Twitter for important
|
16 | announcements.
|
17 |
|
18 | This project adheres to the Contributor Covenant
|
19 | [code of conduct](https://github.com/electron/electron/tree/main/CODE_OF_CONDUCT.md).
|
20 | By participating, you are expected to uphold this code. Please report unacceptable
|
21 | behavior to [coc@electronjs.org](mailto:coc@electronjs.org).
|
22 |
|
23 | ## Installation
|
24 |
|
25 | To install prebuilt Electron binaries, use [`npm`](https://docs.npmjs.com/).
|
26 | The preferred method is to install Electron as a development dependency in your
|
27 | app:
|
28 |
|
29 | ```sh
|
30 | npm install electron --save-dev
|
31 | ```
|
32 |
|
33 | For more installation options and troubleshooting tips, see
|
34 | [installation](docs/tutorial/installation.md). For info on how to manage Electron versions in your apps, see
|
35 | [Electron versioning](docs/tutorial/electron-versioning.md).
|
36 |
|
37 | ## Platform support
|
38 |
|
39 | Each Electron release provides binaries for macOS, Windows, and Linux.
|
40 |
|
41 | * macOS (Big Sur and up): Electron provides 64-bit Intel and Apple Silicon / ARM binaries for macOS.
|
42 | * Windows (Windows 10 and up): Electron provides `ia32` (`x86`), `x64` (`amd64`), and `arm64` binaries for Windows. Windows on ARM support was added in Electron 5.0.8. Support for Windows 7, 8 and 8.1 was [removed in Electron 23, in line with Chromium's Windows deprecation policy](https://www.electronjs.org/blog/windows-7-to-8-1-deprecation-notice).
|
43 | * Linux: The prebuilt binaries of Electron are built on Ubuntu 20.04. They have also been verified to work on:
|
44 | * Ubuntu 18.04 and newer
|
45 | * Fedora 32 and newer
|
46 | * Debian 10 and newer
|
47 |
|
48 | ## Quick start & Electron Fiddle
|
49 |
|
50 | Use [`Electron Fiddle`](https://github.com/electron/fiddle)
|
51 | to build, run, and package small Electron experiments, to see code examples for all of Electron's APIs, and
|
52 | to try out different versions of Electron. It's designed to make the start of your journey with
|
53 | Electron easier.
|
54 |
|
55 | Alternatively, clone and run the
|
56 | [electron/electron-quick-start](https://github.com/electron/electron-quick-start)
|
57 | repository to see a minimal Electron app in action:
|
58 |
|
59 | ```sh
|
60 | git clone https://github.com/electron/electron-quick-start
|
61 | cd electron-quick-start
|
62 | npm install
|
63 | npm start
|
64 | ```
|
65 |
|
66 | ## Resources for learning Electron
|
67 |
|
68 | * [electronjs.org/docs](https://electronjs.org/docs) - All of Electron's documentation
|
69 | * [electron/fiddle](https://github.com/electron/fiddle) - A tool to build, run, and package small Electron experiments
|
70 | * [electron/electron-quick-start](https://github.com/electron/electron-quick-start) - A very basic starter Electron app
|
71 | * [electronjs.org/community#boilerplates](https://electronjs.org/community#boilerplates) - Sample starter apps created by the community
|
72 |
|
73 | ## Programmatic usage
|
74 |
|
75 | Most people use Electron from the command line, but if you require `electron` inside
|
76 | your **Node app** (not your Electron app) it will return the file path to the
|
77 | binary. Use this to spawn Electron from Node scripts:
|
78 |
|
79 | ```javascript
|
80 | const electron = require('electron')
|
81 | const proc = require('node:child_process')
|
82 |
|
83 | // will print something similar to /Users/maf/.../Electron
|
84 | console.log(electron)
|
85 |
|
86 | // spawn Electron
|
87 | const child = proc.spawn(electron)
|
88 | ```
|
89 |
|
90 | ### Mirrors
|
91 |
|
92 | * [China](https://npmmirror.com/mirrors/electron/)
|
93 |
|
94 | See the [Advanced Installation Instructions](https://www.electronjs.org/docs/latest/tutorial/installation#mirror) to learn how to use a custom mirror.
|
95 |
|
96 | ## Documentation translations
|
97 |
|
98 | We crowdsource translations for our documentation via [Crowdin](https://crowdin.com/project/electron).
|
99 | We currently accept translations for Chinese (Simplified), French, German, Japanese, Portuguese,
|
100 | Russian, and Spanish.
|
101 |
|
102 | ## Contributing
|
103 |
|
104 | If you are interested in reporting/fixing issues and contributing directly to the code base, please see [CONTRIBUTING.md](CONTRIBUTING.md) for more information on what we're looking for and how to get started.
|
105 |
|
106 | ## Community
|
107 |
|
108 | Info on reporting bugs, getting help, finding third-party tools and sample apps,
|
109 | and more can be found on the [Community page](https://www.electronjs.org/community).
|
110 |
|
111 | ## License
|
112 |
|
113 | [MIT](https://github.com/electron/electron/blob/main/LICENSE)
|
114 |
|
115 | When using Electron logos, make sure to follow [OpenJS Foundation Trademark Policy](https://trademark-policy.openjsf.org/).
|