Javascript Electron 应用程序的原生 UI 组件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31641732/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-23 06:58:37  来源:igfitidea点击:

Native looking UI components for Electron application

javascripthtmlcsschromiumelectron

提问by Hedge

I'm using Electron (formerly Atom Shell) for a desktop application. It is a lot of fun to use and event-driven programming has its merits.

我将 Electron(以前称为 Atom Shell)用于桌面应用程序。使用起来很有趣,事件驱动编程也有它的优点。

I've got all HTML, CSS & JS power at my hands because it uses one of the more recent Chromium builds. I'd like to use UI elements which look similar to the native ones (from OS X in my case).

我掌握了所有 HTML、CSS 和 JS 功能,因为它使用了较新的 Chromium 版本之一。我想使用看起来类似于本机元素的 UI 元素(在我的例子中来自 OS X)。

Is there a UI library imitating the look and functionality of the native UI elements or other ones which fit nicely into such a desktop application?

是否有一个 UI 库模仿原生 UI 元素的外观和功能,或其他非常适合此类桌面应用程序的元素?

采纳答案by Shawn Rakowski

After searching around the web a bit I found a bootstrap theme called Maverix. I don't think it matches OSX perfectly, but it looks pretty darn close. It is open source under MIT so you should be able to bend it to your will. After scanning through there demo pageit even calls out Electron (Atom-Shell) as a good use case:

在网上搜索了一下之后,我发现了一个名为Maverix的引导程序主题。我不认为它与 OSX 完美匹配,但它看起来非常接近。它在 MIT 下是开源的,因此您应该可以根据自己的意愿进行修改。在浏览了演示页面后,它甚至将 Electron (Atom-Shell) 称为一个很好的用例:

It is perfect to be used for apps that are based on HTML App Containers such as: MacGap Node-Webkit Github Atom ShellAdobe Brackets Shell

它非常适合用于基于 HTML App Containers 的应用程序,例如: MacGap Node-Webkit Github Atom ShellAdobe Brackets Shell

This seems like it would do exactly what you are looking for.

这似乎完全符合您的要求。

回答by Fabien Sa

Photon is a recent project but it is probably what you want. For the moment the UI is only like OSX.

Photon 是最近的一个项目,但它可能是您想要的。目前,用户界面仅像 OSX。

UI toolkit for building desktop apps with Electron.

用于使用 Electron 构建桌面应用程序的 UI 工具包。

Link: http://photonkit.com/

链接:http: //photonkit.com/

回答by Edu Zamora

Another option, although it seems pretty young, would be React Desktop. For now it has partial support for OS X El Capitan and Windows 10, but hopefully the number of components available and systems supported will grow.

另一种选择,虽然它看起来很年轻,但它是React Desktop。目前它部分支持 OS X El Capitan 和 Windows 10,但希望可用组件和支持的系统数量会增加。

This library has been created to bring a native desktop experience to the web. It works extremely well with tools such as node-webkit or Electron.js!

该库旨在为 Web 带来原生桌面体验。它与 node-webkit 或 Electron.js 等工具配合得非常好!

回答by Sista Fiolen

https://xel-toolkit.org

https://xel-toolkit.org

Other answers provide one frame and some components, Xel provide more components. Xel build on Web Components, is framework-agnostic.

其他答案提供了一个框架和一些组件,Xel 提供了更多组件。Xel 基于 Web 组件构建,与框架无关。