Expand description
SalsaTheme provides a styling system for ratatui apps.
It has a simple flat naming scheme.
But it can store
- ratatui Style
- composite styles as used by rat-widget. eg CheckboxStyle
- practically anything else.
§Naming styles
-
It has an extension trait for Style that adds constants for known styles. In the same manner you can add your application specific styles and have them with code completion.
-
For rat-widget composite style it defines an anchor struct WidgetStyle that performs the same purpose.
§Usage
Checkbox::new()
.styles(theme.style(WidgetStyle::CHECKBOX))
.render(area, buf, &mut state);Modules§
Structs§
- Palette
- Color palette.
- Salsa
Theme - SalsaTheme holds any predefined styles for the UI.
- Widget
Style - Anchor struct for the names of composite styles used by rat-widget’s.
Enums§
- Category
- Categorization of themes. Helpful when extending an existing theme.
Traits§
Functions§
- create_
empty - Create an empty SalsaTheme.
- create_
palette - Get a Palette by name.
- create_
theme - Create a theme.
- dark_
theme - A dark theme.
- fallback_
theme - A theme to test the fallback-styles of each widget.
- log_
style_ define - Log style definition.
- salsa_
palettes - All currently existing color palettes.
- salsa_
themes - Get all Salsa themes.
- shell_
theme - A ‘shell’-theme.