
Theme-agnostic Compose UI toolkit delivering expressive Material 3 components—~30 widgets and 5 Canvas charts—with deep customization, host-driven motion, lightweight footprint, and no bundled icon pack.
A theme-agnostic Jetpack Compose component library, built on Expressive Material 3.
Asgard ships the structure and motion of a polished UI — a signature header, expressive
navigation, connected segmented toggles, stat tiles, banners, charts, and tactile press animations —
while reading all colors, typography, and shapes from the host app's MaterialTheme. The
same component renders as "Thor" in one app and "Loki" in another; the library never imposes a
palette or font.
Born from the Thor app's design system, extracted so every app — yours included — can share one component layer.
MaterialTheme. Drop it into any app and it looks like that app.asgard.trinadhthatakula.com — browse every component and chart in a searchable index, then open its live preview and Kotlin example. The Android and web galleries use Thor’s Asgard light and dark palettes, Outfit for headings and body text, and Fira Code for labels and code. Use Theme to try another accent, text scale or layout direction.
Use Modifier.asgardGlass(source, enabled = …) on an individual Asgard, Material, or custom Compose
component. Register the backdrop with Modifier.asgardGlassSource(source). The optional
com.trinadhthatakula:asgard-glass:2.2.0 artifact also provides a wrapper for slot content and dedicated toolbar and navigation containers.
In the Android app or browser gallery, choose Browse → component → Preview glass to try the treatment and see its compatibility score out of five. Integration guide · HTML engineering report · All component ratings · Release notes
Configured navigation animates tab bounds and labels; progress rings keep custom-spring samples within their valid range; and shimmer reuses its gradient during drawing. Android Lifecycle lint checks run again. See the release notes and performance report for validation and emulator measurement limits.
This release adds configurable connected-button shapes and multiselect; docked/floating, expanding/segmented/standard navigation; sheets and searchable pickers; action toolbars and avatars; list/grid scrollbars; and a date/value calendar heatmap. See the API guide for examples and input contracts. Release artifacts become available after the release PR merges and the Maven Central workflow succeeds.
Run the permanent :androidApp module (com.valhalla.asgard.app) in Android Studio, or install it
with ./gradlew :androidApp:installDebug. It shares the web gallery's catalog and includes reusable
device tests. See Android gallery and tests for build-free reruns of the
installed test APKs and the independently compiled published-version compatibility fixture.
The Fastlane guide covers the gallery’s Google Play listing, artwork and signed app bundle.
Add the Asgard dependency from Maven Central. Gradle resolves the matching platform artifact.
// build.gradle.kts
dependencies {
implementation("com.trinadhthatakula:asgard:2.2.0")
}Artifacts. Asgard is a Kotlin Multiplatform library published as three core Maven Central
coordinates. Depend on the umbrella asgard and Gradle resolves the right one per target — or depend
on a single platform artifact directly if you only want one:
| Coordinate | Platform | Format |
|---|---|---|
com.trinadhthatakula:asgard |
all — auto-resolves the variant (recommended) | Gradle Module Metadata |
com.trinadhthatakula:asgard-android |
Android only | .aar |
com.trinadhthatakula:asgard-wasm-js |
wasmJs only | .klib |
The optional glass add-on follows the same scheme with asgard-glass, asgard-glass-android and
asgard-glass-wasm-js. Adding the umbrella glass artifact also brings in matching Asgard core.
kotlin {
sourceSets {
commonMain.dependencies {
implementation("com.trinadhthatakula:asgard:2.2.0")
}
}
}Asgard targets Android and wasmJs from commonMain; an Android project transparently gets
the asgard-android variant from the same coordinate.
If the host app already bundles Asgard, depend on it as compileOnly so it isn't duplicated in your
extension APK — the host provides it at runtime.
Match the host's bundled version; this example uses a host on 2.0.1:
compileOnly("com.trinadhthatakula:asgard:2.0.1")Asgard shares the com.trinadhthatakula namespace with the
thor-extension-api contract; both are
provided by the Thor host at runtime.
Upgrading from 1.x? See the Migration guide — 2.0 is mostly additive with a few small breaking changes (usually a 0–2 line change).
Wrap your app in any MaterialTheme (Asgard inherits it) and compose:
val tabs = listOf(
AsgardNavItem(icon = Icons.Rounded.Apps, label = "Apps"),
AsgardNavItem(icon = Icons.Rounded.AcUnit, label = "Freezer"),
)
var selected by remember { mutableIntStateOf(0) }
MaterialExpressiveTheme { // or your own MaterialTheme — Asgard follows it
Scaffold(
bottomBar = {
AsgardNavigationBar(items = tabs, selectedIndex = selected, onSelect = { selected = it })
},
) { padding ->
Column(Modifier.padding(padding)) {
AsgardHeader(
title = "Apps",
icon = Icons.Rounded.Dashboard,
actions = {
ConnectedButtonGroup(
items = listOf(
ConnectedButtonGroupItem.Icon(Icons.Rounded.GridView, "Grid"),
ConnectedButtonGroupItem.Icon(Icons.AutoMirrored.Rounded.List, "List"),
),
selectedIndex = 0,
onItemSelected = { /* … */ },
)
},
)
AsgardStatCard(
label = "Battery",
value = "82",
unit = "%",
icon = Icons.Rounded.Bolt,
modifier = Modifier.fillMaxWidth(),
)
}
}
}All icons are supplied by you as
ImageVector— Asgard bundles no icon pack. The only built-in glyph isAsgardHeader's back arrow, a self-contained vector, so the library forces nomaterial-iconsartifact onto your app.
Every component reads color/type/shape from the ambient MaterialTheme, takes a modifier, and
exposes flat customization params. Browse them all — live — in the
gallery.
Structure & navigation
| Component | What it is |
|---|---|
AsgardHeader |
Signature screen header: optional brand icon / back button + heavy primary-tinted title + trailing actions. No TopAppBar. |
AsgardNavigationBar · AsgardNavigationRail
|
Expressive bottom bar / side rail with an animated selected pill and label reveal. Driven by AsgardNavItem (with optional badge). |
AsgardSectionCard |
Titled, rounded tonal surface that groups related rows. |
Inputs & actions
| Component | What it is |
|---|---|
ConnectedButtonGroup |
Single- or multi-select connected segmented control; crash-safe at any font scale. Items via ConnectedButtonGroupItem (Label / Icon / IconWithLabel). |
AsgardLabeledSlider |
Label + formatted value over an M3 Slider. |
AsgardStepperRow |
Labeled numeric stepper with decrement/increment. |
AsgardSearchBar |
Single-line search field with an auto-managed clear button. |
AsgardTonalIconButton |
Thin tonal icon-button wrapper. |
AsgardActionItem |
Vertical icon-chip + label action tile with press feedback. |
Data display
| Component | What it is |
|---|---|
AsgardStatCard |
Vertical metric card (icon-above-value or inline "bento"), optional unit + click. |
AsgardStatTile |
Compact metric tile: label + value, status dot, icon badge, secondary value, count-up. |
AsgardAnimatedNumeral |
Numeric text that slides/counts on change (odometer style). |
AsgardListRow · AsgardFeatureRow
|
Generic list row (icon/title/subtitle/trailing) and onboarding feature row. |
AsgardBadge · StatusChip
|
Label pills — filled/outlined badge, and a compact status chip. |
AsgardProgressRing |
Circular progress / gauge ring with a centered content slot. |
Feedback & states
| Component | What it is |
|---|---|
AsgardBanner |
Full-width tonal callout: icon + title + description + optional action. |
AsgardEmptyState · AsgardLoadingState
|
Centered empty / loading placeholders. |
AsgardShimmer |
Skeleton shimmer placeholder. |
AsgardDialogScaffold |
Thin M3 AlertDialog wrapper for confirm/dismiss dialogs. |
Settings & monetization
| Component | What it is |
|---|---|
AsgardSettingRow · AsgardSettingToggleRow
|
Preference rows — value/navigation and a trailing switch. |
AsgardProBadge · AsgardUpgradeCard · AsgardLockedOverlay
|
A pro-gate kit: a "PRO" pill, an upgrade card, and a blur-and-scrim content gate. |
AsgardOnboardingScaffold |
Onboarding page scaffold: title, subtitle, content, actions. |
Motion
| API | What it is |
|---|---|
Modifier.expressivePress() |
Tactile squish-on-press, sourced from MaterialTheme.motionScheme. |
Modifier.animateExpressiveResize() |
Spring resize using the host motion scheme. |
A pure-Canvas charting set (no extra dependencies) in com.valhalla.asgard.charts, theme-agnostic
like everything else:
| Chart | What it draws |
|---|---|
AsgardLineChart |
Multi-series smoothed (or straight) line + gradient area, auto Y-scaling, grid, axis labels, end markers. Data via AsgardChartPoint / AsgardLineSeries. |
AsgardStackedBarChart |
N-segment stacked bars with a shared scale and dimmed "partial" bars (AsgardBarStack). |
AsgardTimelineBar |
Colored interval spans across a time window (AsgardTimelineSegment). |
AsgardChartLegend |
Wrapping swatch + label key shared by every chart (AsgardLegendEntry). |
AsgardPulseRing |
Decorative expanding-ring attention pulse behind any content. |
AsgardLineChart(
series = listOf(
AsgardLineSeries(
points = prices.mapIndexed { i, p -> AsgardChartPoint(i.toFloat(), p.value, p.date) },
color = MaterialTheme.colorScheme.primary,
),
),
yValueFormatter = { "₹${it.roundToInt()}" },
modifier = Modifier.fillMaxWidth().height(220.dp),
)Use the selectedIndices overload to toggle items independently. Every checked item uses
the theme's primary container and onPrimary content, just like the single-select overload.
var selected by remember { mutableStateOf(setOf(0, 1)) }
ConnectedButtonGroup(
items = listOf(
ConnectedButtonGroupItem.Label("User"),
ConnectedButtonGroupItem.Label("System"),
),
selectedIndices = selected,
onSelectionChanged = { if (it.isNotEmpty()) selected = it },
)The component permits an empty selection; the callback above keeps at least one item selected.
Group-wide and per-item enabled flags, icons, labels, colors and spacing work with either overload.
The existing selectedIndex / onItemSelected API remains single-select.
Nothing is hardcoded. Asgard resolves color, typography, shape and motion from the host
MaterialTheme, so it adopts your brand automatically:
MaterialExpressiveTheme(colorScheme = myBrandScheme, shapes = myShapes) {
// every Asgard component now uses myBrandScheme + myShapes
}AsgardDefaults, which reads MaterialTheme.shapes — override
MaterialTheme.shapes and Asgard reshapes with your app. Any component also accepts a per-call
shape.AsgardActionItem(
icon = Icons.Rounded.Notifications,
label = "Notification settings",
onClick = { /* … */ },
labelMaxLines = 1, // constrain text
labelStyle = MaterialTheme.typography.titleSmall, // restyle
shape = RoundedCornerShape(12.dp), // reshape
)The Expressive Material 3 theme gives the richest motion; any MaterialTheme works.
minSdk 28) + wasmJs, JDK 21MaterialExpressiveTheme gives the richest motion, but any
MaterialTheme works.An integration skill for coding agents lives at
.claude/skills/asgard-ui/SKILL.md — it teaches an agent how to
add the dependency and use Asgard's components and charts correctly in a KMP or Android project.
This repository is the source for its references and compiled examples. To check or update the
installed Codex copy, run python3 tools/sync_asgard_skill.py --check or
python3 tools/sync_asgard_skill.py, respectively. Use --destination <skill-directory> for a
different installation. Synchronization updates repository-owned files and leaves unrelated local
files alone. CI checks public API coverage and compiles the skill examples for Android and wasmJs.
Releases are automated: bump VERSION_NAME in gradle.properties on a topic branch and merge
its PR to main. The
Publish to Maven Central workflow publishes via the Vanniktech plugin, then tags + creates a
GitHub Release. Credentials live in repository secrets. To publish manually on JDK 21:
JAVA_HOME=$(/usr/libexec/java_home -v 21) ./gradlew publishToMavenCentral --no-configuration-cacheLocal dry-run without a GPG key: ./gradlew publishToMavenLocal -PVERSION_NAME=2.2.0-SNAPSHOT --no-configuration-cache.
For a consumer that includes Asgard as a composite build, use -PasgardAgpVersion=<consumer AGP version>
when its Android Gradle Plugin differs from Asgard's default. Gradle requires matching AGP versions
across included Android builds; the override only applies to that invocation.
A theme-agnostic Jetpack Compose component library, built on Expressive Material 3.
Asgard ships the structure and motion of a polished UI — a signature header, expressive
navigation, connected segmented toggles, stat tiles, banners, charts, and tactile press animations —
while reading all colors, typography, and shapes from the host app's MaterialTheme. The
same component renders as "Thor" in one app and "Loki" in another; the library never imposes a
palette or font.
Born from the Thor app's design system, extracted so every app — yours included — can share one component layer.
MaterialTheme. Drop it into any app and it looks like that app.asgard.trinadhthatakula.com — browse every component and chart in a searchable index, then open its live preview and Kotlin example. The Android and web galleries use Thor’s Asgard light and dark palettes, Outfit for headings and body text, and Fira Code for labels and code. Use Theme to try another accent, text scale or layout direction.
Use Modifier.asgardGlass(source, enabled = …) on an individual Asgard, Material, or custom Compose
component. Register the backdrop with Modifier.asgardGlassSource(source). The optional
com.trinadhthatakula:asgard-glass:2.2.0 artifact also provides a wrapper for slot content and dedicated toolbar and navigation containers.
In the Android app or browser gallery, choose Browse → component → Preview glass to try the treatment and see its compatibility score out of five. Integration guide · HTML engineering report · All component ratings · Release notes
Configured navigation animates tab bounds and labels; progress rings keep custom-spring samples within their valid range; and shimmer reuses its gradient during drawing. Android Lifecycle lint checks run again. See the release notes and performance report for validation and emulator measurement limits.
This release adds configurable connected-button shapes and multiselect; docked/floating, expanding/segmented/standard navigation; sheets and searchable pickers; action toolbars and avatars; list/grid scrollbars; and a date/value calendar heatmap. See the API guide for examples and input contracts. Release artifacts become available after the release PR merges and the Maven Central workflow succeeds.
Run the permanent :androidApp module (com.valhalla.asgard.app) in Android Studio, or install it
with ./gradlew :androidApp:installDebug. It shares the web gallery's catalog and includes reusable
device tests. See Android gallery and tests for build-free reruns of the
installed test APKs and the independently compiled published-version compatibility fixture.
The Fastlane guide covers the gallery’s Google Play listing, artwork and signed app bundle.
Add the Asgard dependency from Maven Central. Gradle resolves the matching platform artifact.
// build.gradle.kts
dependencies {
implementation("com.trinadhthatakula:asgard:2.2.0")
}Artifacts. Asgard is a Kotlin Multiplatform library published as three core Maven Central
coordinates. Depend on the umbrella asgard and Gradle resolves the right one per target — or depend
on a single platform artifact directly if you only want one:
| Coordinate | Platform | Format |
|---|---|---|
com.trinadhthatakula:asgard |
all — auto-resolves the variant (recommended) | Gradle Module Metadata |
com.trinadhthatakula:asgard-android |
Android only | .aar |
com.trinadhthatakula:asgard-wasm-js |
wasmJs only | .klib |
The optional glass add-on follows the same scheme with asgard-glass, asgard-glass-android and
asgard-glass-wasm-js. Adding the umbrella glass artifact also brings in matching Asgard core.
kotlin {
sourceSets {
commonMain.dependencies {
implementation("com.trinadhthatakula:asgard:2.2.0")
}
}
}Asgard targets Android and wasmJs from commonMain; an Android project transparently gets
the asgard-android variant from the same coordinate.
If the host app already bundles Asgard, depend on it as compileOnly so it isn't duplicated in your
extension APK — the host provides it at runtime.
Match the host's bundled version; this example uses a host on 2.0.1:
compileOnly("com.trinadhthatakula:asgard:2.0.1")Asgard shares the com.trinadhthatakula namespace with the
thor-extension-api contract; both are
provided by the Thor host at runtime.
Upgrading from 1.x? See the Migration guide — 2.0 is mostly additive with a few small breaking changes (usually a 0–2 line change).
Wrap your app in any MaterialTheme (Asgard inherits it) and compose:
val tabs = listOf(
AsgardNavItem(icon = Icons.Rounded.Apps, label = "Apps"),
AsgardNavItem(icon = Icons.Rounded.AcUnit, label = "Freezer"),
)
var selected by remember { mutableIntStateOf(0) }
MaterialExpressiveTheme { // or your own MaterialTheme — Asgard follows it
Scaffold(
bottomBar = {
AsgardNavigationBar(items = tabs, selectedIndex = selected, onSelect = { selected = it })
},
) { padding ->
Column(Modifier.padding(padding)) {
AsgardHeader(
title = "Apps",
icon = Icons.Rounded.Dashboard,
actions = {
ConnectedButtonGroup(
items = listOf(
ConnectedButtonGroupItem.Icon(Icons.Rounded.GridView, "Grid"),
ConnectedButtonGroupItem.Icon(Icons.AutoMirrored.Rounded.List, "List"),
),
selectedIndex = 0,
onItemSelected = { /* … */ },
)
},
)
AsgardStatCard(
label = "Battery",
value = "82",
unit = "%",
icon = Icons.Rounded.Bolt,
modifier = Modifier.fillMaxWidth(),
)
}
}
}All icons are supplied by you as
ImageVector— Asgard bundles no icon pack. The only built-in glyph isAsgardHeader's back arrow, a self-contained vector, so the library forces nomaterial-iconsartifact onto your app.
Every component reads color/type/shape from the ambient MaterialTheme, takes a modifier, and
exposes flat customization params. Browse them all — live — in the
gallery.
Structure & navigation
| Component | What it is |
|---|---|
AsgardHeader |
Signature screen header: optional brand icon / back button + heavy primary-tinted title + trailing actions. No TopAppBar. |
AsgardNavigationBar · AsgardNavigationRail
|
Expressive bottom bar / side rail with an animated selected pill and label reveal. Driven by AsgardNavItem (with optional badge). |
AsgardSectionCard |
Titled, rounded tonal surface that groups related rows. |
Inputs & actions
| Component | What it is |
|---|---|
ConnectedButtonGroup |
Single- or multi-select connected segmented control; crash-safe at any font scale. Items via ConnectedButtonGroupItem (Label / Icon / IconWithLabel). |
AsgardLabeledSlider |
Label + formatted value over an M3 Slider. |
AsgardStepperRow |
Labeled numeric stepper with decrement/increment. |
AsgardSearchBar |
Single-line search field with an auto-managed clear button. |
AsgardTonalIconButton |
Thin tonal icon-button wrapper. |
AsgardActionItem |
Vertical icon-chip + label action tile with press feedback. |
Data display
| Component | What it is |
|---|---|
AsgardStatCard |
Vertical metric card (icon-above-value or inline "bento"), optional unit + click. |
AsgardStatTile |
Compact metric tile: label + value, status dot, icon badge, secondary value, count-up. |
AsgardAnimatedNumeral |
Numeric text that slides/counts on change (odometer style). |
AsgardListRow · AsgardFeatureRow
|
Generic list row (icon/title/subtitle/trailing) and onboarding feature row. |
AsgardBadge · StatusChip
|
Label pills — filled/outlined badge, and a compact status chip. |
AsgardProgressRing |
Circular progress / gauge ring with a centered content slot. |
Feedback & states
| Component | What it is |
|---|---|
AsgardBanner |
Full-width tonal callout: icon + title + description + optional action. |
AsgardEmptyState · AsgardLoadingState
|
Centered empty / loading placeholders. |
AsgardShimmer |
Skeleton shimmer placeholder. |
AsgardDialogScaffold |
Thin M3 AlertDialog wrapper for confirm/dismiss dialogs. |
Settings & monetization
| Component | What it is |
|---|---|
AsgardSettingRow · AsgardSettingToggleRow
|
Preference rows — value/navigation and a trailing switch. |
AsgardProBadge · AsgardUpgradeCard · AsgardLockedOverlay
|
A pro-gate kit: a "PRO" pill, an upgrade card, and a blur-and-scrim content gate. |
AsgardOnboardingScaffold |
Onboarding page scaffold: title, subtitle, content, actions. |
Motion
| API | What it is |
|---|---|
Modifier.expressivePress() |
Tactile squish-on-press, sourced from MaterialTheme.motionScheme. |
Modifier.animateExpressiveResize() |
Spring resize using the host motion scheme. |
A pure-Canvas charting set (no extra dependencies) in com.valhalla.asgard.charts, theme-agnostic
like everything else:
| Chart | What it draws |
|---|---|
AsgardLineChart |
Multi-series smoothed (or straight) line + gradient area, auto Y-scaling, grid, axis labels, end markers. Data via AsgardChartPoint / AsgardLineSeries. |
AsgardStackedBarChart |
N-segment stacked bars with a shared scale and dimmed "partial" bars (AsgardBarStack). |
AsgardTimelineBar |
Colored interval spans across a time window (AsgardTimelineSegment). |
AsgardChartLegend |
Wrapping swatch + label key shared by every chart (AsgardLegendEntry). |
AsgardPulseRing |
Decorative expanding-ring attention pulse behind any content. |
AsgardLineChart(
series = listOf(
AsgardLineSeries(
points = prices.mapIndexed { i, p -> AsgardChartPoint(i.toFloat(), p.value, p.date) },
color = MaterialTheme.colorScheme.primary,
),
),
yValueFormatter = { "₹${it.roundToInt()}" },
modifier = Modifier.fillMaxWidth().height(220.dp),
)Use the selectedIndices overload to toggle items independently. Every checked item uses
the theme's primary container and onPrimary content, just like the single-select overload.
var selected by remember { mutableStateOf(setOf(0, 1)) }
ConnectedButtonGroup(
items = listOf(
ConnectedButtonGroupItem.Label("User"),
ConnectedButtonGroupItem.Label("System"),
),
selectedIndices = selected,
onSelectionChanged = { if (it.isNotEmpty()) selected = it },
)The component permits an empty selection; the callback above keeps at least one item selected.
Group-wide and per-item enabled flags, icons, labels, colors and spacing work with either overload.
The existing selectedIndex / onItemSelected API remains single-select.
Nothing is hardcoded. Asgard resolves color, typography, shape and motion from the host
MaterialTheme, so it adopts your brand automatically:
MaterialExpressiveTheme(colorScheme = myBrandScheme, shapes = myShapes) {
// every Asgard component now uses myBrandScheme + myShapes
}AsgardDefaults, which reads MaterialTheme.shapes — override
MaterialTheme.shapes and Asgard reshapes with your app. Any component also accepts a per-call
shape.AsgardActionItem(
icon = Icons.Rounded.Notifications,
label = "Notification settings",
onClick = { /* … */ },
labelMaxLines = 1, // constrain text
labelStyle = MaterialTheme.typography.titleSmall, // restyle
shape = RoundedCornerShape(12.dp), // reshape
)The Expressive Material 3 theme gives the richest motion; any MaterialTheme works.
minSdk 28) + wasmJs, JDK 21MaterialExpressiveTheme gives the richest motion, but any
MaterialTheme works.An integration skill for coding agents lives at
.claude/skills/asgard-ui/SKILL.md — it teaches an agent how to
add the dependency and use Asgard's components and charts correctly in a KMP or Android project.
This repository is the source for its references and compiled examples. To check or update the
installed Codex copy, run python3 tools/sync_asgard_skill.py --check or
python3 tools/sync_asgard_skill.py, respectively. Use --destination <skill-directory> for a
different installation. Synchronization updates repository-owned files and leaves unrelated local
files alone. CI checks public API coverage and compiles the skill examples for Android and wasmJs.
Releases are automated: bump VERSION_NAME in gradle.properties on a topic branch and merge
its PR to main. The
Publish to Maven Central workflow publishes via the Vanniktech plugin, then tags + creates a
GitHub Release. Credentials live in repository secrets. To publish manually on JDK 21:
JAVA_HOME=$(/usr/libexec/java_home -v 21) ./gradlew publishToMavenCentral --no-configuration-cacheLocal dry-run without a GPG key: ./gradlew publishToMavenLocal -PVERSION_NAME=2.2.0-SNAPSHOT --no-configuration-cache.
For a consumer that includes Asgard as a composite build, use -PasgardAgpVersion=<consumer AGP version>
when its Android Gradle Plugin differs from Asgard's default. Gradle requires matching AGP versions
across included Android builds; the override only applies to that invocation.