13 个版本
0.2.2 | 2024年7月3日 |
---|---|
0.2.1 | 2024年6月18日 |
0.2.0 |
|
0.1.1 | 2024年3月7日 |
0.1.0 | 2024年3月6日 |
#566 in GUI
每月下载量 132 次
在 kwui 中使用
145KB
2.5K SLoC
特性
- 内置 JavaScript 引擎和 CSS 解析器
- 类似于 React Hooks 的函数组件 API
- 轻松实现 Rust 和 JavaScript 之间的互操作
- 跨平台支持(Windows,Android)
文档
常见问题解答
- 为什么还需要另一个 GUI 库?
- 快速将服务器端 Rust 代码迁移到客户端,以探索和评估新技术。
- 快速将工具迁移到移动平台。
示例 - Hello world
import { useState } from "Keact";
function HelloWorld(props, kids) {
let [n, setN] = useState(0);
return <button onclick={() => setN(n + 1)}>{`Click ${n} times`}</button>;
}
app.showDialog({
title: "Hello World",
root: <HelloWorld />,
stylesheet: css`
button { margin: 10px; padding: 4px; background-color: orange; }
button:hover { background-color: orangered; }
`
});
画廊
VoIP 测试工具

远程桌面

安装程序

Android 示例


依赖项
~0–3.5MB
~55K SLoC