Crates.io | kwui-sys |
lib.rs | kwui-sys |
version | 0.2.2 |
source | src |
created_at | 2024-03-06 12:47:16.142667 |
updated_at | 2024-07-03 06:53:14.52585 |
description | sys-crate for kwui - A GUI library with JSX/CSS support |
homepage | |
repository | https://github.com/wanghoi/kwui-rs/ |
max_upload_size | |
id | 1164741 |
size | 145,155 |
A cross-platform GUI library for Rust focused on simplicity and fast development of small tools. Inspired by sciter.
Rust
and JavaScript
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; }
`
});