Expand description
Design tokens for iced-plus.
This crate provides a comprehensive set of design tokens for building consistent, themeable user interfaces with the iced GUI framework.
§Token Categories
- Colors: Color scales and semantic palettes
- Typography: Text styles with font, size, weight, and line height
- Spacing: Modular spacing scale for margins, padding, and gaps
- Radius: Border radius presets
- Elevation: Shadow and depth definitions
- Motion: Animation duration and easing presets
§Example
use iced_plus_tokens::presets;
// Get a pre-built theme
let theme = presets::light();
// Access tokens
let spacing = theme.tokens.spacing.lg(); // 16.0
let primary = theme.tokens.colors.primary.s500; // Primary blue§Feature Flags
preset-light(default): Include the light theme presetpreset-dark(default): Include the dark theme presetserde: Enable serialization/deserialization support
Re-exports§
pub use color::Color;pub use color::ColorPalette;pub use color::ColorScale;pub use color::SemanticColors;pub use color::Shade;pub use elevation::Elevation;pub use elevation::ElevationLevel;pub use elevation::ElevationScale;pub use elevation::Shadow;pub use motion::DurationPreset;pub use motion::Easing;pub use motion::Motion;pub use motion::MotionScale;pub use radius::RadiusScale;pub use radius::RadiusSize;pub use spacing::SpacingScale;pub use spacing::SpacingSize;pub use tokens::ThemePreset;pub use tokens::ThemeTokens;pub use typography::FontWeight;pub use typography::TextStyle;pub use typography::TextStyleName;pub use typography::TypographyScale;