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 dynamics::remember_liquid_dynamics;pub use dynamics::LiquidDynamics;pub use dynamics::LiquidPose;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: 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.
Structs§
- Glass
Profile Curve - A normalized center-to-edge cubic cross-section.
- Glass
Profile Knot - One normalized
(axis, height)sample and its generated cubic tangent. - Glass
Surface Profile - Two principal cross-sections defining one coupled oval surface inside a superelliptic aperture.
Enums§
- Glass
Profile Error - Validation failure while constructing a physical glass profile.
Constants§
- MAX_
GLASS_ PROFILE_ KNOTS - Maximum knots in one principal-axis profile.