Asgard Engineering report
Compose Multiplatform · Asgard 2.2.0

Opt-in glass
for Asgard

Choose glass for an individual card, button or custom control. The host owns the backdrop, and each component keeps its own selection, gestures and content.

See the Compose API
Try glass on each surface
Browser illustration using CSS frost. Landsat 7 image courtesy of USGS EROS. Image source

Recommendation

Asgard 2.2.0

Use Haze in the optional asgard-glass add-on. Register the background once and apply frost to each chosen component. Lens refraction remains a future experiment.

Glass earns its place where a control floats over content that moves beneath it. Frost softens background detail so the label stays readable. Refraction also bends that detail near the edges. A bar over an empty scaffold inset has little to sample. Place the feed behind the bar and reserve enough scroll padding to reach the last item. Apple’s material guidance likewise places glass in a distinct layer for navigation and controls. Apple material guidance

Asgard already gets its colors, shapes and typography from the host’s Material theme. Keep that contract. Installing the add-on should only make glass available. Each component instance explicitly selects it, and the host can turn it off for accessibility or by user preference. The core artifact can continue to ship without a renderer dependency. Asgard library contract

Renderer comparison

All three libraries publish Android and Wasm variants under Apache 2.0. Haze is the best fit for starting with frost and adding a lens later through the same source registration. Repository stars below are rounded adoption signals observed on 22 November 2026.

Haze 2.1.0

≈2.7k GitHub stars

First choice. Core tracks source layers. Separate haze-blur and haze-glass modules provide frost and refraction. The 2.1.0 artifacts declare Kotlin 2.4.21 and Compose 1.12.2. A sample using both modules compiled with Asgard’s newer Compose pin. Ship core and blur for the first style, then add the glass module when the lens is ready.

Release Published variants Glass behavior

Backdrop 2.0.1

≈4.7k GitHub stars

Best alternative for bespoke optics. Kyant’s io.github.kyant0:backdrop provides composable blur, lens, highlights and layer backdrops. Android blur requires API 31 and the lens requires API 33. Its 2.x line publishes both Asgard targets. It suits a team that wants to art-direct the material and own its presets and fallbacks.

Project Effect guide Published variants Android sources

Liquid 1.1.1

≈580 GitHub stars

Focused lens alternative. FletchMcKee’s liquid pairs an explicit source with an effect modifier and offers shader-driven distortion. It publishes the required variants. Its metadata targets Kotlin 2.3.0 and Compose 1.10.0, a wider version gap to exercise if Asgard chooses this engine.

Project Source and effect Published variants

Compose alone

Built-in fallback

A theme-colored fill and outline are cheap and predictable on every Asgard target. Compose’s Modifier.blur() softens the contents of its own layer, including any text drawn there. Backdrop frost needs a separately sampled background with sharp controls drawn over it. Building that pipeline in Asgard would also make Asgard responsible for capture, coordinates and platform differences.

Compose blur behavior

Platform behavior

The current checkout targets Android API 28+ and Kotlin/Wasm in the browser, with Kotlin 2.4.21, Compose Multiplatform and Material 3 1.13.0-alpha02, and Android compile SDK 37.2. A renderer’s platform list is broader than Asgard’s published variants. Library targets · Version catalog

Behavior when an instance requests glass
TargetCurrent treatmentImplementation decision
Android 28–30Opaque themed surfaceHaze Blur defaults to a scrim here. Choose the host’s solid container and skip capture and experimental legacy blur.
Android 31–32Opaque themed surfaceAPI 31 can recapture sources on unrelated snapshot changes. Keep this tier solid pending physical-device profiling.
Android 33+Hardware-accelerated frostAccelerated windows sample the backdrop. Software-rendered windows use a solid themed fill.
Browser WasmFrostedHaze samples the backdrop through Skia. The browser’s reduced-transparency preference selects a solid surface.
iOS / macOSFuture Asgard targetsFirst add, publish and test an iOS or macOS target. macOS via desktop JVM is a separate packaging choice from native macOS Arm64. Haze offers variants for both. Native Apple Liquid Glass would require a separate interop decision.

Haze platform behavior Blur targets Android runtime shaders Apple framework adoption

Opt-in API

Register the image or scrolling content with asgardGlassSource. Put a glass modifier on each chosen control. This example uses an app-provided photo and tap handler. The card keeps its own text colors and click handling.

Kotlin · opt-in metric card
val shape = MaterialTheme.shapes.large
val fill = MaterialTheme.colorScheme.surfaceContainer
val source = rememberAsgardGlassSource(enabled = glassCard && !reduceTransparency)
Box {
    Photo(Modifier.matchParentSize().asgardGlassSource(source))
    AsgardStatCard(
        label = "Voltage", value = "5.00", unit = "V",
        modifier = Modifier.asgardGlass(source, enabled = glassCard, shape = shape, containerColor = fill),
        shape = shape,
        containerColor = if (glassCard) Color.Transparent else fill,
        onClick = openVoltageDetails,
    )
}

Where to place the effect

The source records just the background subtree, such as the scrolling list. The overlay samples that source in the same coordinate space, clips and tints it inside its resolved container shape, then draws icons and labels above it. Keep overlays outside their own source and share one recording across the chosen surfaces. A missing or disabled source uses the ordinary Material fill. Haze core concepts

What belongs in each artifact

Core Asgard exposes a container slot on the toolbar and configured navigation bar. It draws inside the control’s shape and insets. The add-on supplies source.frosted(enabled), Modifier.asgardGlass, and AsgardGlassSurface for content slots. Applications using core alone can keep their current dependencies.

Component compatibility

In the Android or browser gallery, choose Browse → component → Preview glass. Each entry remembers its own switch as you browse. For a modal, turn on the preview and then open the sheet or dialog.

Scores describe design fit and integration effort. A 5 has a natural glass container. A 4 needs explicit shape, color or state handling. A 3 depends on content or density. A 2 favors a surrounding surface or in-window slot. A 1 keeps the component’s own visual effect and uses glass only behind it. Device performance is assessed separately.

View all 44 component ratings
ComponentScoreHow to apply glass
AsgardActionItem4/5Frost the action tile and keep its icon and caption legible through the press animation.
AsgardActionSheet2/5Put the source and frosted message inside the sheet window. Keep footer actions readable.
AsgardActionToolbar5/5Use the container overload to share one backdrop across the toolbar actions.
AsgardAnimatedNumeral3/5Draw a glass plate behind the numeral so its changing digits stay sharp.
AsgardAvatar3/5Frost an initials or icon fill. An opaque photograph can use a glass frame.
AsgardBadge4/5Match the pill shape, clear the badge fill and preserve the outline and text color.
AsgardBanner4/5Use the banner shape and semantic tint. A custom gradient must leave the backdrop visible.
AsgardCalendarHeatmap2/5Use one plate under the grid and retain distinct colors for missing, zero and selected dates.
AsgardChartLegend4/5Frost the legend container once and keep all series swatches opaque.
AsgardDialogScaffold2/5Use an in-window source for the dialog body and preserve the modal scrim.
AsgardEmptyState4/5Use a bounded surface behind the empty-state icon and message.
AsgardFeatureRow4/5Apply frost beneath the row and keep the feature icon badge distinct.
AsgardGlassSurface5/5Pass the shared source and place custom content inside this shaped surface.
AsgardHeader5/5Frost a pinned header over scrolling content and retain the host's title and action colors.
AsgardLabeledSlider3/5Frost the group behind the slider while retaining the track, thumb and value colors.
AsgardLazyScrollbar2/5Use a plate for the scroll area and preserve the thumb contrast and drag target.
AsgardLegendItem4/5Place the label and swatch together on one small plate.
AsgardLineChart2/5Use a single chart plate and keep plotted lines, axes and data labels sharp.
AsgardListRow3/5Select individual rows or one shared list container. Measure fast scrolling with repeated effects.
AsgardLoadingState3/5Frost the caption and spinner container, leaving the progress indicator distinct.
AsgardLockedOverlay1/5Preserve the lock scrim and input interception. Put optional frost on the supporting content.
AsgardNavigationBar5/5Use the configured bar's container slot so the floating margin stays clear.
AsgardNavigationRail4/5Match the rail bounds and clear its fill. Retain the selected destination indicator.
AsgardOnboardingScaffold3/5Keep the onboarding surface bounded and check long text over the brightest background.
AsgardPicker3/5Place one surface behind the picker and keep its search, item labels and selection readable.
AsgardPickerSheet2/5Place the backdrop and picker together inside the sheet body.
AsgardProBadge4/5Retain the premium tint and its matching foreground on a pill-shaped surface.
AsgardProgressRing2/5Keep the ring stroke and progress label sharp over a supporting plate.
AsgardPulseRing2/5Leave the animated pulse in the foreground and use frost on its supporting surface.
AsgardSearchBar4/5Keep the field outline, cursor, placeholder and error state legible over the fill.
AsgardSectionCard5/5Frost the card once, clear its internal fill and share the background across its rows.
AsgardSettingRow4/5Use a bounded row surface and retain contrast for both the label and trailing value.
AsgardSettingToggleRow4/5Keep the switch track, thumb and checked state independent of the row background.
AsgardSheet2/5Put a bounded source inside the sheet and frost the selected content slot.
AsgardShimmer1/5Preserve the skeleton animation. Use glass only for its supporting surface.
AsgardStackedBarChart2/5Draw one plate beneath the plot and preserve segment colors and axis labels.
AsgardStatCard5/5Match the card shape, make the card fill transparent and retain label and value colors.
AsgardStatTile5/5Frost an individual tile while keeping the number, icon and status dot sharp.
AsgardStepperRow4/5Use one surface behind the value and controls and retain their disabled states.
AsgardTimelineBar2/5Use a supporting plate and preserve the segment boundaries and time encoding.
AsgardTonalIconButton4/5Match the button shape and clear its active fill while keeping a contrasting icon.
AsgardUpgradeCard4/5Keep the call-to-action colors explicit when replacing the promotional card fill.
ConnectedButtonGroup3/5Frost the group once and retain opaque checked indicators and distinct disabled segments.
StatusChip4/5Use a pill-shaped background and retain the status label and foreground color.

Evidence & release checks

Asgard 2.2.0 includes per-component previews and a shared rating table used by both galleries and the Asgard skill. The implementation guide gives the current API and Android fallback policy. Glass UI integration guide

The same Xiaomi gallery tile with Material fill on the left and glacier colors visible through frost on the right
Xiaomi, Android API 37. The frosted tile still counted up on tap. Opening the avatar left its preview off, and Back restored the tile’s glass selection.
Release candidate verification. All 38 app tests passed on the API 36 emulator, including a switch check for all 54 gallery entries. Four glass tests passed on the API 28 solid fallback. In the Wasm gallery, Chromium rendered the frosted tile and restored its solid fill when reduced transparency was enabled. Optimized physical-device and browser frame costs still need measurement.
1. Exercise the same scene in both galleries.
Use the shared gallery’s glacier scene to exercise scrolling beneath the toolbar and floating bar. Independently toggle each surface and switch to the solid fallback. Check rest, fast scroll, route changes, RTL, resizing and clipped custom shapes. An area outside the selected surface should match the solid baseline. Existing gallery harness
2. Check legibility against the worst backdrop.
Try bright photos, dark photos and dense text in both host themes. Measure the composited pixels behind labels. Target 4.5:1 for ordinary text, 3:1 for large text and 3:1 for required control boundaries or state indicators. Use explicit host content colors and a stronger tint or opaque fill when needed. Honor reduced transparency through an app preference and available platform signals. Disable optional animated highlights under reduced motion. Check focus, TalkBack, touch targets and 200% text scaling in both modes. Text contrast · Non-text contrast
3. Measure cost per selected surface.
Compare the same scrolling workload with zero, one and two glass surfaces on physical Android devices spanning the three API tiers and in the Wasm gallery. Record frame-time percentiles, missed deadlines, GPU time where available, memory and artifact size. Agree a regression budget against the plain baseline before shipping. Profile API 31 during an unrelated animation. If a tier misses its budget, ship the solid fallback there. Asgard’s existing emulator measurements cover other components. Asgard benchmark method · Haze performance guidance
4. Verify the published consumer paths.
Resolve core alone and confirm its dependency graph excludes Haze. Resolve the add-on from a test Maven repository on both targets. Run the compatibility fixture and extend it with a toolbar and configured navigation call compiled against 2.1.1. Ship frost when these checks pass. Evaluate lens distortion against the same scenes and budget before exposing it. Existing compatibility fixture