use-theme 0.1.0

Theme identity and mode primitives for RustUse UI
Documentation
  • Coverage
  • 20%
    5 out of 25 items documented1 out of 12 items with examples
  • Size
  • Source code size: 6.02 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 570.43 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-ui
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-theme

Theme identity and mode primitives for RustUse UI.

Purpose

use-theme describes theme names, variants, display modes, and semantic theme roles. It intentionally avoids color math, contrast checks, palette generation, and the deeper responsibilities of use-color.

Example

use use_theme::{SemanticThemeRole, ThemeMode, ThemeName, ThemeVariant};

let name = ThemeName::new("Acme");
let variant = ThemeVariant::new("high-contrast");

assert_eq!(name.as_str(), "Acme");
assert_eq!(variant.as_str(), "high-contrast");
assert_eq!(ThemeMode::Dark.as_str(), "dark");
assert_eq!(SemanticThemeRole::Primary.as_str(), "primary");

Main types

  • ThemeMode
  • ThemeName
  • ThemeVariant
  • SemanticThemeRole

Facade relationship

The use-ui facade exposes this crate as use_ui::theme when the theme or full feature is enabled.