Crates.io | kwui |
lib.rs | kwui |
version | 0.1.1 |
source | src |
created_at | 2024-03-06 12:59:23.68197 |
updated_at | 2024-03-07 15:40:35.494247 |
description | A GUI library with JSX/CSS support |
homepage | |
repository | https://gitee.com/wanghoi/kwui-rs |
max_upload_size | |
id | 1164767 |
size | 537,493 |
使用 JSX、CSS 构建简单的桌面应用。
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; }
`
});
git clone https://gitee.com/wanghoi/kwui-rs.git
cargo run --example installer
cargo add kwui
已经有很多界面库了,为什么还要重复造轮子?
为了解决工作中的问题:
因为有趣: