Skip to main content

Theme

Trait Theme 

Source
pub trait Theme:
    Send
    + Sync
    + Debug {
    // Required methods
    fn name(&self) -> &str;
    fn color_scheme(&self) -> ColorScheme;
    fn colors(&self) -> &ColorTokens;
    fn typography(&self) -> &TypographyTokens;
    fn spacing(&self) -> &SpacingTokens;
    fn radii(&self) -> &RadiusTokens;
    fn shadows(&self) -> &ShadowTokens;
    fn animations(&self) -> &AnimationTokens;
}
Expand description

The main theme trait that all themes must implement

Required Methods§

Source

fn name(&self) -> &str

Get the theme name for debugging

Source

fn color_scheme(&self) -> ColorScheme

Get the current color scheme

Source

fn colors(&self) -> &ColorTokens

Get color tokens

Source

fn typography(&self) -> &TypographyTokens

Get typography tokens

Source

fn spacing(&self) -> &SpacingTokens

Get spacing tokens

Source

fn radii(&self) -> &RadiusTokens

Get radius tokens

Source

fn shadows(&self) -> &ShadowTokens

Get shadow tokens

Source

fn animations(&self) -> &AnimationTokens

Get animation tokens

Implementors§