Expand description
Theme state management with localStorage persistence.
Provides a reactive theme system with 7 nature-inspired themes:
- Sunrise: Warm dawn colors (coral, gold, amber)
- Violet: Twilight mystical (lavender, magenta, soft pink)
- Ocean: Deep sea calm (turquoise, aqua, seafoam)
- Mountain: Clean tech (cyan, indigo) - default
- Rose: Warm pink/rose tones
- Forest: Deep green earth tones
- Ember: Red/orange fire tones
§Usage
use logicaffeine_web::ui::theme_state::{ThemeState, Theme};
// Provide at app root
use_context_provider(ThemeState::new);
// Use in components
let mut theme_state = use_context::<ThemeState>();
let current = theme_state.current();
theme_state.set_theme(Theme::Ocean);Structs§
- Theme
State - Global theme state with localStorage persistence.
Enums§
- Theme
- Available theme variants.
Functions§
- theme_
css - Returns the full theme CSS including variables and background.