Skip to content

astrum-chat/gpui_tesserae

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

164 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tesserae

Tesserae is a WIP component system for GPUI.

It currently offers the following components:

  • Checkbox

    checkbox

  • Switch

    switch

  • Button

    button

  • Single-line Input

    input

  • Select

    select

  • Chat bubble

    chat bubble

Examples can be found here.

Setup

use gpui::{App, Application, Window, WindowOptions, prelude::*};
use gpui_tesserae::{TesseraeAssets, assets, views::Root};

fn main() {
    Application::new()
        .with_assets(
            // Tesserae provides an `assets!` macro which
            // makes it easy to compose multiple asset providers
            // together.
            assets![TesseraeAssets],
        )
        .run(|cx: &mut App| {
            // Tesserae needs to be initialized before it can be used.
            gpui_tesserae::init(cx);

            cx.open_window(
                WindowOptions::default(),
                |window, cx| {
                    let main = cx.new(|cx| MainView::new(cx));

                    // You must wrap your root view with `gpui_tesserae::views::Root`.
                    // Omitting this will cause crashes.
                    cx.new(|cx| Root::new(main, window, cx))
                },
            )
            .unwrap();
        });
}

About

A component system for GPUI.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages