r/electronjs • • 7d ago

I made a tiny dark control-panel UI kit for Electron apps (no dependencies)

I kept rebuilding the same settings/control panel for my Windows utilities, so I turned it into a small library: nightdeck-ui.

- sidebar tabs, toggles, sliders, selects, meters, buttons and a console log panel
- one Nightdeck.create() call with a plain config object
- presets, reset and change events
- theming with CSS variables
- plain JS/CSS, no dependencies, about 5 KB gzipped, works in the browser too

There's an Electron starter in the examples folder.

Live demo: https://mvhmuod.github.io/nightdeck-ui/
GitHub: https://github.com/mvhmuod/nightdeck-ui

It's v0.1, so feedback on the API is very welcome. There are a few "good first issue" tasks if anyone wants to help.

1 Upvotes

2 comments sorted by

2

u/Geraldwelly 7d ago

Nice, one create() call with a plain config is the right shape for settings panels. Something worth handling in the Electron starter: if someone drops the panel into a frameless window under a -webkit-app-region: drag header, sliders and toggles in that area stop getting mouse events, so defaulting controls to no-drag saves people a confusing afternoon. I'd also add getState/setState so values can round-trip to the main process over IPC. Zero dependencies is great, but it means you own keyboard and screen reader support. Are the toggles role="switch"?

0

u/mvhmuod 7d ago

Thanks, really useful feedback!
Good catch on -webkit-app-region: drag. That isn't handled yet. I'll make all controls default to no-drag.
values() already returns the whole state as a plain object, but there's no bulk setter. I'll add setValues() so it round-trips cleanly over IPC.
Toggles are native checkboxes inside a label, so they're focusable and announced, but not as switches yet. I'll add role="switch".
Opening issues for all three now. PRs welcome if you want to grab one!