Expand description
§Complete Theme Definition
A Theme is a complete, coherent collection of all design tokens needed
to render the Fern Shell UI. It combines colors, typography, spacing, and
radius into a single validated structure.
§Design Rationale
Rather than scattering token values throughout components, a Theme provides
a single source of truth. This ensures:
- Completeness — All required tokens are present
- Coherence — Tokens are designed to work together
- Configurability — Users can customize via config files
§Theme Variants
Fern supports multiple theme variants:
- Dark — Dark backgrounds with light text (default)
- Light — Light backgrounds with dark text
- Auto — Follows system preference (future)
§Example
ⓘ
use fernctl::domain::theme::{Theme, ThemeVariant};
// Load default dark theme
let theme = Theme::dark();
// Access tokens
let bg = theme.colors.background;
let font = &theme.typography.family;
let radius = theme.radius.button();Structs§
- BarConfig
- Bar (panel) configuration.
- Color
Palette - Color palette for a theme.
- Theme
- A complete theme combining all design tokens.
Enums§
- BarPosition
- Bar position on screen.
- Theme
Variant - Theme variant selection.