mottes-floem-components 0.1.0

Some styled components for floem.
Documentation
  • Coverage
  • 33.33%
    14 out of 42 items documented6 out of 25 items with examples
  • Size
  • Source code size: 338.62 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.74 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 1m 59s Average build duration of successful builds.
  • all releases: 1m 59s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • miampf

Mottes floem components

Some components I designed for the floem UI crate.

a screenshot of the widget gallery

Usage

This crate contains three important modules: theme, views and classes.

In theme you'll find the Theme struct which you will need to easily style the colors of the components in this crate. This Theme is basically just a wrapper around the base 16 color scheme standard. If you want to create your own theme, feel free to do so, you just need to put your hex colors into your own struct and you're good to go. If you just wanna get started, use Theme::default().

In views you find components that were implemented as standard floem views. You can just add these like any floem component and pass the theme you are using to them (e.g. avatar(|| fs::read("image.png").unwrap(), theme)).

In classes you find style classes that you can apply to existing floem components using .class(). Use the construct_theme method of the module to make all classes available. For an example of every component and class, look into the gallery example.