0.4.1 • Published 5 months ago
bosk v0.4.1
bosk
🌲🌲
Bosk is a GJS library for creating GTK 4 applications.
Usage
import { present, run, useState } from "bosk";
import Gtk from "gi://Gtk?version=4.0";
function Counter() {
const count = useState(0);
return (
<Gtk.Box>
{count}
<Gtk.Button on:clicked={() => ++count.value}>Increment</Gtk.Button>
</Gtk.Box>
);
}
await run(
<Gtk.Application
on:activate={(application) =>
present(
<Gtk.ApplicationWindow application={application}>
<Counter />
</Gtk.ApplicationWindow>,
)
}
/>,
);
Documentation
Available at https://bosk.fyi/.