0.4.1 • Published 5 months ago

bosk v0.4.1

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
5 months ago

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/.

0.4.1

5 months ago

0.4.0

5 months ago

0.3.0

5 months ago