Module: ui.theme
Source: ./ui/theme.reef
Overview
ui/theme.reef - Theme system for UI styling Part of reef-stdlib UI module
This module provides theming support for consistent UI styling. Includes color schemes, typography, spacing, and border styles.
Types
ThemeColors
Fields:
| Name | Type |
|---|---|
background |
core.Color |
foreground |
core.Color |
primary |
core.Color |
secondary |
core.Color |
accent |
core.Color |
error |
core.Color |
success |
core.Color |
warning |
core.Color |
ThemeFonts
Fields:
| Name | Type |
|---|---|
default_size |
float |
small_size |
float |
large_size |
float |
heading_size |
float |
mono_size |
float |
ThemeSpacing
Fields:
| Name | Type |
|---|---|
xs |
float |
sm |
float |
md |
float |
lg |
float |
xl |
float |
ThemeBorders
Fields:
| Name | Type |
|---|---|
width |
float |
radius |
float |
focus_width |
float |
Theme
Fields:
| Name | Type |
|---|---|
colors |
ThemeColors |
fonts |
ThemeFonts |
spacing |
ThemeSpacing |
borders |
ThemeBorders |
Functions
fn theme_colors(background: core.Color, foreground: core.Color, primary: core.Color, secondary: core.Color, accent: core.Color, error: core.Color, success: core.Color, warning: core.Color): ThemeColors
fn colors_background(c: ThemeColors): core.Color
fn colors_foreground(c: ThemeColors): core.Color
fn colors_primary(c: ThemeColors): core.Color
fn colors_secondary(c: ThemeColors): core.Color
fn colors_accent(c: ThemeColors): core.Color
fn colors_error(c: ThemeColors): core.Color
fn colors_success(c: ThemeColors): core.Color
fn colors_warning(c: ThemeColors): core.Color
fn colors_primary_hover(c: ThemeColors): core.Color
Derived colors - computed from base colors
fn colors_primary_pressed(c: ThemeColors): core.Color
fn colors_disabled(c: ThemeColors): core.Color
fn colors_border(c: ThemeColors): core.Color
fn colors_surface(c: ThemeColors): core.Color
fn theme_fonts(default_size: float, small_size: float, large_size: float, heading_size: float, mono_size: float): ThemeFonts
fn fonts_default_size(f: ThemeFonts): float
fn fonts_small_size(f: ThemeFonts): float
fn fonts_large_size(f: ThemeFonts): float
fn fonts_heading_size(f: ThemeFonts): float
fn fonts_mono_size(f: ThemeFonts): float
fn theme_spacing(xs: float, sm: float, md: float, lg: float, xl: float): ThemeSpacing
fn spacing_xs(s: ThemeSpacing): float
fn spacing_sm(s: ThemeSpacing): float
fn spacing_md(s: ThemeSpacing): float
fn spacing_lg(s: ThemeSpacing): float
fn spacing_xl(s: ThemeSpacing): float
fn theme_borders(width: float, radius: float, focus_width: float): ThemeBorders
fn borders_width(b: ThemeBorders): float
fn borders_radius(b: ThemeBorders): float
fn borders_focus_width(b: ThemeBorders): float
fn theme(colors: ThemeColors, fonts: ThemeFonts, spacing: ThemeSpacing, borders: ThemeBorders): Theme
fn theme_colors_of(t: Theme): ThemeColors
fn theme_fonts_of(t: Theme): ThemeFonts
fn theme_spacing_of(t: Theme): ThemeSpacing
fn theme_borders_of(t: Theme): ThemeBorders
fn default_theme(): Theme
fn dark_theme(): Theme
fn high_contrast_theme(): Theme
Generated by reefc doc