SlideShare a Scribd company logo
Make your Electron app feel at
home everywhere
InfoQ.com: News & Community Site
• Over 1,000,000 software developers, architects and CTOs read the site world-
wide every month
• 250,000 senior developers subscribe to our weekly newsletter
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• 2 dedicated podcast channels: The InfoQ Podcast, with a focus on
Architecture and The Engineering Culture Podcast, with a focus on building
• 96 deep dives on innovative topics packed as downloadable emags and
minibooks
• Over 40 new content items per week
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
electron-app/
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Presented at QCon San Francisco
www.qconsf.com
✋
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
$ electron index.js
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
Kilian Valkhof
kilianvalkhof.com | @kilianvalkhof
Superposition.designPolypane.app
Qt
GTK
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
8 ways to make your
Electron app feel great on
all three platforms
Opening your app
1.
$ electron index.js
Hide the app until the page has loaded
Use a background color that matches your app
Closing your app
2.
The window is the appThe app has windows
Windows and Linux:
All app windows closed = close the app
Don’t close the app on MacOS.
…But don’t do that on MacOS.
And make sure to
recreate the window
when the dock icon
is clicked.
Remember user preferences
3.
Make Your Electron App Feel at Home Everywhere
• Window dimensions
• Window position
• Which monitor
• If the app is maximised
• Window dimensions
• Window position
• Which monitor
• If the app is maximised
electron-settings
Restore the window
position on load
Or use electron-window-state
Keep track of the last used folder
Make Your Electron App Feel at Home Everywhere
OS-specific menu
4.
npm install electron-create-menu
Make Your Electron App Feel at Home Everywhere
Text highlighting
5.
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
Context menus
6.
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
Or use electron-context-menu
Keyboard shortcuts
7.
Keyboard
shortcuts use
ctrl
Keyboard
shortcuts use
cmd (⌘)
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
CmdOrCtrl
Using system fonts
8.
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
Memory
Memory
https://electronjs.org/docs/tutorial/performance
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
chrome://inspect
In conclusion
Don’t launch your app like a site
1.
Hide until
“ready-to-show”
Use a fitting
backgroundColor
Handle window closing like the OS
2.
Keep app running
on MacOS, re-
open on click.
Closing the (last) window
should close the app on
Windows and Linux
Remember user preferences
3.
Restore windows
to their last
position and size
Remember the last used
folder
OS specific menu
4.
Use electron-create-menu
Prevent text highlighting
5.
Use electron-create-menu
Context menus
6.
Right clicking on
text should have
cut, copy etc.
Use contextual info to
give extra options for
images, links etc.
OS-specific keyboard shortcuts
7.
Use CmdOrCtrl
Use the system font
8.
kilianvalkhof.com | @kilianvalkhof | polypane.app
electronjs.org
App icons
9.
.icns .ico .png
16x16
32x32
128x128
256x256
512x512
1024x1024
16x16
24x24
48x48
256x256
1024x1024
png2icns icotool whatever
16x16
32x32
128x128
256x256
512x512
1024x1024
16x16
24x24
48x48
256x256
1024x1024
App layout
10.
Flexbox
CSS Grid
Grid stylesheets:
constraint based css
gss.github.io
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
electron-app/

More Related Content

PPTX
A Java Microservices Spring Boot and Docker case study.
PDF
Electron: From Beginner to Pro
PDF
Cross-Platform Desktop Apps with Electron (CodeStock Edition)
PPSX
Electron - Build cross platform desktop apps
PPTX
Electron - cross platform desktop applications made easy
PPTX
Learn Electron for Web Developers
PPTX
Cross-platform Desktop Apps development using HTML, CSS, JS with Electron
PDF
Electron JS | Build cross-platform desktop applications with web technologies
A Java Microservices Spring Boot and Docker case study.
Electron: From Beginner to Pro
Cross-Platform Desktop Apps with Electron (CodeStock Edition)
Electron - Build cross platform desktop apps
Electron - cross platform desktop applications made easy
Learn Electron for Web Developers
Cross-platform Desktop Apps development using HTML, CSS, JS with Electron
Electron JS | Build cross-platform desktop applications with web technologies

Similar to Make Your Electron App Feel at Home Everywhere (20)

PDF
Electron: Linux, Windows or Macos?
PDF
Electron Firenze 2020: Linux, Windows o MacOS?
PDF
Building desktop applications for fun with electron
PDF
Develop an app for Windows 8 using HTML5
PDF
Desktop apps with Electron... for fun and profit
PDF
PDF
Electron
PDF
Get that Corner Office with Angular 2 and Electron
PDF
JavaScript and Desktop Apps - Introduction to Electron
PDF
Introducing Electron
PDF
PDF
Electron presentation
PDF
An overview of the architecture of electron.js
PDF
Learning React Native Building Native Mobile Apps With Javascript 2nd Edition...
PDF
Lesson 02 - React Native Development Environment Setup
PPTX
SenchaCon 2016: Advanced Techniques for Buidling Ext JS Apps with Electron - ...
PDF
Desktop apps with node webkit
PPTX
Mobile Application and Developments.pptx
PPTX
iOS 7 UI Guidelines
PDF
Serving QML applications over the network
Electron: Linux, Windows or Macos?
Electron Firenze 2020: Linux, Windows o MacOS?
Building desktop applications for fun with electron
Develop an app for Windows 8 using HTML5
Desktop apps with Electron... for fun and profit
Electron
Get that Corner Office with Angular 2 and Electron
JavaScript and Desktop Apps - Introduction to Electron
Introducing Electron
Electron presentation
An overview of the architecture of electron.js
Learning React Native Building Native Mobile Apps With Javascript 2nd Edition...
Lesson 02 - React Native Development Environment Setup
SenchaCon 2016: Advanced Techniques for Buidling Ext JS Apps with Electron - ...
Desktop apps with node webkit
Mobile Application and Developments.pptx
iOS 7 UI Guidelines
Serving QML applications over the network
Ad

More from C4Media (20)

PDF
Streaming a Million Likes/Second: Real-Time Interactions on Live Video
PDF
Next Generation Client APIs in Envoy Mobile
PDF
Software Teams and Teamwork Trends Report Q1 2020
PDF
Understand the Trade-offs Using Compilers for Java Applications
PDF
Kafka Needs No Keeper
PDF
High Performing Teams Act Like Owners
PDF
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
PDF
Service Meshes- The Ultimate Guide
PDF
Shifting Left with Cloud Native CI/CD
PDF
CI/CD for Machine Learning
PDF
Fault Tolerance at Speed
PDF
Architectures That Scale Deep - Regaining Control in Deep Systems
PDF
ML in the Browser: Interactive Experiences with Tensorflow.js
PDF
Build Your Own WebAssembly Compiler
PDF
User & Device Identity for Microservices @ Netflix Scale
PDF
Scaling Patterns for Netflix's Edge
PDF
The Talk You've Been Await-ing For
PDF
Future of Data Engineering
PDF
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
PDF
Navigating Complexity: High-performance Delivery and Discovery Teams
Streaming a Million Likes/Second: Real-Time Interactions on Live Video
Next Generation Client APIs in Envoy Mobile
Software Teams and Teamwork Trends Report Q1 2020
Understand the Trade-offs Using Compilers for Java Applications
Kafka Needs No Keeper
High Performing Teams Act Like Owners
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
Service Meshes- The Ultimate Guide
Shifting Left with Cloud Native CI/CD
CI/CD for Machine Learning
Fault Tolerance at Speed
Architectures That Scale Deep - Regaining Control in Deep Systems
ML in the Browser: Interactive Experiences with Tensorflow.js
Build Your Own WebAssembly Compiler
User & Device Identity for Microservices @ Netflix Scale
Scaling Patterns for Netflix's Edge
The Talk You've Been Await-ing For
Future of Data Engineering
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Navigating Complexity: High-performance Delivery and Discovery Teams
Ad

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Tartificialntelligence_presentation.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Mushroom cultivation and it's methods.pdf
PPT
Teaching material agriculture food technology
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Encapsulation theory and applications.pdf
PDF
Heart disease approach using modified random forest and particle swarm optimi...
Per capita expenditure prediction using model stacking based on satellite ima...
Building Integrated photovoltaic BIPV_UPV.pdf
A Presentation on Artificial Intelligence
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Assigned Numbers - 2025 - Bluetooth® Document
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Tartificialntelligence_presentation.pptx
NewMind AI Weekly Chronicles - August'25-Week II
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Group 1 Presentation -Planning and Decision Making .pptx
Unlocking AI with Model Context Protocol (MCP)
Digital-Transformation-Roadmap-for-Companies.pptx
Empathic Computing: Creating Shared Understanding
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Mushroom cultivation and it's methods.pdf
Teaching material agriculture food technology
A comparative analysis of optical character recognition models for extracting...
Encapsulation theory and applications.pdf
Heart disease approach using modified random forest and particle swarm optimi...

Make Your Electron App Feel at Home Everywhere