Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dylanblokhuis/tpaint
Build a native GUI with Dioxus on whatever platform that can render triangles
https://github.com/dylanblokhuis/tpaint
dioxus gui rust
Last synced: about 2 months ago
JSON representation
Build a native GUI with Dioxus on whatever platform that can render triangles
- Host: GitHub
- URL: https://github.com/dylanblokhuis/tpaint
- Owner: dylanblokhuis
- License: mit
- Created: 2023-08-22T19:54:17.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-02-11T12:14:38.000Z (11 months ago)
- Last Synced: 2024-02-11T13:27:17.336Z (11 months ago)
- Topics: dioxus, gui, rust
- Language: Rust
- Homepage:
- Size: 772 KB
- Stars: 13
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tpaint
Compose your UI with Dioxus (React-inspired) and Tailwind ergonomics and bring your own rendering backend to paint the triangles to the screen.### Currently supports:
- Background color
- Border
- Border Radius
- Text
- Text color
- Hot reloading, use the ``hot-reload`` feature
- Scrolling
- Async images and vector graphics through ``Image`` component, with ``src`` attribute.
- Grid and flexbox (through Taffy)
- Text selection
- Cursors with e.g. ``cursor-progress``
- Input field
- Custom fonts### Examples
tpaint uses egui's rasterization backend, so adding your backend is trivial!Current examples include:
- glow (OpenGL)
- wgpu### Element
``view`` is the only element you can compose your UI's with, it supports various events:- onfocus
- onblur
- ondrag
- oninput
- onkeydown
- onkeyup
- onclick
- onmousemove
- onlayout (``whenever the layout engine has re-calculated the layout``)
- onselect```rust
view {
class: "h-40 p-10 bg-red-900 text-white",
onclick: move |_| {
println!("Clicked");
},
"I am a button"
}
```