Expand description
Liquid UI — cranpose’s first-party component library.
An iOS-26-style “Liquid Glass” design system: translucent lens materials over live backdrop (refraction, blur, vibrancy, chromatic aberration, specular rims), semantic theming with automatic light/dark, and spring-physics motion. Pure UI code — no platform dependencies; runs on every cranpose target.
ⓘ
use cranpose::liquid::prelude::*;
LiquidTheme(LiquidThemeSpec::default(), || {
GlassButton(Modifier::empty(), GlassButtonSpec::prominent(), on_click, || {
GlassButtonLabel("Add");
});
});Re-exports§
pub use material::Glass;pub use material::GlassDynamics;pub use material::GlassVariant;pub use material::LiquidModifierExt;pub use material::LiquidShape;pub use motion::liquid_press_scale;pub use motion::LiquidMotion;pub use theme::liquid_colors;pub use theme::liquid_typography;pub use theme::LiquidColors;pub use theme::LiquidTheme;pub use theme::LiquidThemeSpec;pub use theme::LiquidTypography;pub use theme::SchemeMode;pub use widgets::*;
Modules§
- icons
- Built-in vector icon set (24×24 viewBox path data, Material Design icons,
Apache-2.0), rasterized through
cranpose_ui_graphics::VectorPathand tinted at draw time. - material
- The Liquid Glass material: a backdrop lens (blur → refraction/vibrancy
shader) applied to a composable’s own bounds through
LiquidModifierExt::glass_effect— the analogue of SwiftUI’s.glassEffect(_:in:). - motion
- Liquid motion: the spring presets every component shares, and the press interaction (scale + specular boost) that makes glass feel physical.
- prelude
- Everything an app needs to build Liquid UI.
- theme
- Liquid theme: semantic colors, the iOS-style type ramp, and glass defaults,
provided to the subtree through composition locals — the analogue of
MaterialTheme. - widgets
- The Liquid component set.