Electron + Tailwind CSS v4 · free and open source
Electron Tailwind CSS boilerplate, v4 and dark mode included
Utility classes in the renderer. Dark mode straight from the OS.
Tailwind CSS v4 through its Vite plugin, theme tokens as CSS variables, shadcn/ui components and a dark mode wired to Electron nativeTheme. And the whole desktop stack behind it.
$ npx degit nick-keller/electron-appstack/template my-appTailwind CSS
- shadcn/ui
- Radix UI
Lucide
React
TypeScript
Vite
tRPC
- Electron
Tailwind CSS setup
Tailwind CSS v4, ready for a desktop app
No config file to write, a theme you change in one place, and dark mode that behaves like a native app.
Tailwind v4, zero config
The @tailwindcss/vite plugin and one @import line. No tailwind.config.js, no PostCSS setup.
Theme tokens
background, foreground, primary, muted… are CSS variables: write bg-background, change the palette in one file.
Dark mode from the OS
System, light or dark from the native menu or the settings. The dark: variant follows Electron nativeTheme.
Components included
shadcn/ui components styled with Tailwind, Radix UI primitives, Lucide icons and tw-animate-css.
src/renderer/src/styles.css
Your whole theme in one stylesheet
Tailwind CSS v4 is configured in CSS. Colors are variables, redefined for dark mode, and every component reads them.
Read the theming guide@import "tailwindcss";
@import "tw-animate-css";
@custom-variant dark (&:is(.dark *));
:root {
--background: oklch(1 0 0);
--foreground: oklch(0.145 0 0);
--primary: oklch(0.205 0 0);
}
.dark {
--background: oklch(0.145 0 0);
--foreground: oklch(0.985 0 0);
}And much more
Much more than an Electron Tailwind CSS boilerplate
Tailwind CSS is only the start. Electron AppStack includes 20 of the 22 features we compare boilerplates on, where the most popular other Electron Tailwind CSS boilerplates average 9: a typed backend, a database, auto update, signed releases, source code protection and license keys, all wired together and documented.
Features included
Set up, working together and tested in a shipped commercial app.
17 guidesDocumentation
From the first run to signing, notarizing, updating and selling your app.
v45Latest Electron
The latest Electron, React, Vite and TypeScript, kept current.
$0MIT License
No paid tier. Build commercial apps and sell them.
Typed IPC with tRPC
Call the main process from React with typed, zod-validated procedures.
License keys and Stripe
Activation window, offline use and updates gated by license, with LicenseManager and Stripe.
Source code protection
V8 bytecode main process, Electron fuses and ASAR integrity, on by default.
Hot reload
electron-vite reloads the renderer instantly and restarts the main process on change.
Modern React stack
React 19 with type-safe file-based routing from TanStack Router and TanStack Query.
Typed app config
electron-store validated by a zod schema, read and written from anywhere.
Local database
SQLite with Drizzle ORM: typed queries, generated migrations applied automatically on startup.
Auto update
electron-updater checks GitHub Releases and installs new versions.
Translations
i18next with typed keys, shared by the renderer and the native menu.
Signed releases
Changesets and GitHub Actions to build, sign, notarize and publish for every platform.
Icons and images
Conventions for the app icon, DMG background and renderer images.
Ready for AI agents
AGENTS.md, CLAUDE.md and skills so Claude Code, Cursor, Codex and Copilot follow the conventions.
Unit tests
Vitest tests for the main process, on an in-memory database, without Electron.
Compare
Electron AppStack vs other Tailwind CSS boilerplates
The most popular maintained Electron Tailwind CSS boilerplates, side by side. Electron AppStack is #1 of 19 in our ranking.
| Feature | Electron AppStack | electron-shadcn | Electron React App | electron-vite-react |
|---|---|---|---|---|
| Developer experience | ||||
| AI agent instructionsAGENTS.md or rules so coding agents follow the conventions. | ✓ | × | × | × |
| Frontend | ||||
| UI componentsA component library or design system. | ✓ | ✓ | ✓ | × |
| Backend | ||||
| Typed IPCCalls from the renderer to the main process are typed end to end. | ✓ | ✓ | ✓ | × |
| Local databaseAn embedded database with migrations. | ✓ | × | × | × |
| Shipping | ||||
| Auto updateThe app downloads and installs new versions. | ✓ | ✓ | × | ✓ |
| Release workflowCI builds and publishes installers for every platform. | ✓ | ✓ | – | – |
| Code signingSigning and notarization wired into the build. | ✓ | × | × | × |
| Selling | ||||
| Source code protectionBytecode compilation, Electron fuses or ASAR integrity. | ✓ | – | × | × |
| License keysActivation, validation and offline use of license keys. | ✓ | × | × | × |
✓Included–Partial or manual setup×Not includedHover a cell for details.
One command
Create your Tailwind CSS Electron app
Copy the template, install, run. Hot reload starts with the example app: a todo list stored in SQLite and a settings page with light and dark themes.
Read the getting started guidenpx degit nick-keller/electron-appstack/template my-app
cd my-app
npm install
npm run devFAQ
Frequently asked questions
Does it use Tailwind CSS v3 or v4?
Tailwind CSS v4, through the @tailwindcss/vite plugin. There is no tailwind.config file: the theme is defined in the renderer stylesheet with CSS variables.
How does dark mode work?
The theme chosen in the native menu or the settings sets nativeTheme.themeSource in the main process. Chromium exposes it as prefers-color-scheme, and the renderer toggles the dark class, so every dark: utility follows the system or the user choice.
Can I use another component library?
Yes. shadcn/ui components are copied into your code, not installed as a package, so you can delete them and use DaisyUI, Headless UI or your own components with the same Tailwind setup.
Is it really free?
Yes. Electron AppStack is open source under the MIT License, with no paid tier. Use it for commercial apps and sell them. LicenseManager is free up to 100 active licenses, and Stripe only charges a fee on the payments you receive.
Is it a framework I depend on?
No. You copy the template once with degit and the code is yours. There is no package to update and nothing to eject.
Same template
Looking for another stack?
One boilerplate covers all of them: pick the page that matches your search.
Start your Tailwind CSS desktop app today
Free, production-ready, and yours from the first command.
$ npx degit nick-keller/electron-appstack/template my-app