Expand description
Design tokens and the built-in light and dark themes.
Every component resolves its colours through Tokens::of, so any
iced::Theme works. light and dark are tuned for the library,
and Config builds a theme with your own colours on top of either.
Modules§
- radius
- Corner radii in logical pixels.
- space
- Spacing scale in logical pixels.
- text_
size - Text sizes in logical pixels.
Structs§
- Config
- Builds a
Themefrom your own colours, starting from the light or dark defaults. Text on coloured surfaces, such as a primary button’s label, is picked automatically withon. - Tokens
- Semantic colours resolved from a theme.
Functions§
- dark
- The library’s dark theme.
- fade
- Returns
colorwith its alpha multiplied byalpha. - font
- The registered base font, or iced’s default when none is set.
- light
- The library’s light theme.
- mix
- Linearly blends
atowardsbbyt(0.0 isa, 1.0 isb). - on
- Near-black or near-white, whichever reads better on
background. - semibold
- The base font at semibold weight.
- set_
font - Registers the font components use for emphasised text, such as card and
toast titles. Pass the same font you give iced’s
default_font, before the first view. Returnsfalseif a font was already set.