Expand description
Liquid UI — cranpose’s first-party component library.
An iOS-26-style “Liquid Glass” design system: translucent lens materials over live backdrop (wcKSRD refraction, blur, vibrancy, and edge light), 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 dynamics::remember_liquid_dynamics;pub use dynamics::LiquidDynamics;pub use dynamics::LiquidPose;pub use material::glass_light_direction;pub use material::set_glass_light_direction;pub use material::Glass;pub use material::GlassDeformation;pub use material::GlassDynamics;pub use material::GlassShadow;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§
- dynamics
- Water-droplet motion physics shared by every travelling liquid lens.
- 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: Gaussian backdrop frost followed by wcKSRD
refraction 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.