Skip to content

tori-getz/gui

Repository files navigation

Gui - Toy UI library

Install

yarn add @gui-framework/core @gui-framework/dom @gui-framework/vite-plugin

Usage

import * as Gui from '@gui/core';
import GuiDOM from '@gui/dom';

const HelloWorld: Gui.Component = () => {
  const [ counter, setCounter ] = Gui.state<number>(0);
  return (
    <div>
      <h1>Hello, Gui!</h1>
      <p>Counter: {counter}</p>
      <button onClick={() => setCounter(counter + 1)}>increment</button>
    </div>
  );
};

GuiDOM.render(
  <HelloWorld />,
  document.querySelector('#root'),
);

Add to vite.config.ts

import { gui } from '@gui-framework/vite-plugin';

{
  // ...
  plugins: [gui()]
  // ...
}

Author

👤 tori-getz

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2023 tori-getz.
This project is MIT licensed.