vivi_ui 0.2.0

Custom component library for Slint
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 264.04 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.09 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • vivi-rad

vivi

vivi is a component library for Slint.

vivi provides currently the following two sets of components:

  • foundation: Base components that can be used to create a custom component set.
  • magic: Ready to use component set with a custom design based on Catppuccin.

Crates.io Rust docs 0.2.0 Slint docs 0.2.0 MIT licensed

Examples

There is the Gallery that contains an overview of all magic components vivi provides.

Prerequisites

  • Slint >= 1.7

How to use with Rust

  1. Add vivi_ui as build dependency to your Cargo.toml:
[dependencies]
slint = { version = "1.7" }

[build-dependencies]
slint-build = { version = "1.7" }
vivi_ui = { version = "0.2" }
  1. Use vivi::import_paths() in your build.rs file. It will make coop's files visible as @vivi.
fn main() {
    slint_build::compile(
        "ui/index.slint",
        slint_build::CompilerConfiguration::new()
            .with_library_paths(vivi_ui::import_paths()),
    ).unwrap();
}
  1. Add an import to your Slint file (ui/index.slint):
import { MagicWindow, FilledButton } from "@vivi/magic.slint";

export component MyApp inherits MagicWindow {
    preferred-width: 600px;
    preferred-height: 400px;
    title: "MyApp";

    FilledButton {
        text: "Click me";
    }
}

Get Started

To quickly get started, you can use the following rust template repository:

Contribution

Ideas, feedback and code contributions are welcome. Please check the Contribution Guide for more details.

License

The source code of vivi and examples are available under MIT license.