UI

net.zagart.design:ui — Compose Multiplatform UI components, themes, and design tokens

Module

ModuleArtifactTargets
:uinet.zagart.design:uiAndroid, iOS, Desktop

Installation

commonMain.dependencies {
    implementation("net.zagart.design:ui:1.6.5")
}

Basic Usage

import net.zagart.design.ui.DesignTheme
import net.zagart.design.ui.Settings
import net.zagart.design.ui.theme.Theme
import net.zagart.design.ui.components.*
import net.zagart.design.ui.components.button.Button
import net.zagart.design.ui.components.listitem.ListItem
import net.zagart.design.ui.components.listitem.SwitchListItem

val settings = Settings(
    isDark = true,
    animateTransitions = true,
    theme = Theme.Indigo
)

DesignTheme(settings = settings) {
    Column {
        TopAppBar(title = "Settings")
        TextField(value = text, onValueChange = { text = it }, label = "Name")
        ListItem(label = "Notifications", onClick = { })
        SwitchListItem(label = "Dark mode", checked = isDark, onCheckedChange = { isDark = it })
        Button("Save", onClick = { })
    }
}

Features

FeatureDetails
Theme systemDesignTheme wrapping Material3 with 3 color schemes (Indigo, CyanDeep, OliveGold), runtime Settings (dark mode, animations, nav bar type), and LocalScreenConfiguration
Design tokensSpacing scale (spacings.x1x16, base 4dp), dimensions (dimens.iconSize), Material3 color roles, typography, and shapes
Navigation componentsTopAppBar, NavigationBar (adaptive bottom/side rail), FloatingNavigationBar (pill-shaped)
Input & selectionTextField, SearchBar, MoneyInput, SmartStringField, SegmentedButtonRow, Chip, RichChip
List & mediaListItem (with RadioButton/Switch variants), MediaListCard, MediaTile, Selector, VerticalList
Visual & layoutAsyncImage (Coil with shimmer), Gradient, LiveBorderBox, ProgressBar, AdaptiveLayout, Filler, BackHandler
Icon system199 named Icon enum values with stable id strings; composable resolves to Material ImageVector (filled/outlined)
Extensions & utilitiesComposable spacers, String.parseBold() for AnnotatedString, WindowInsets helpers, CornerBasedShape clipping, SystemBarsSetup / ImmersiveModeSetup

Versioning & Releases

  1. Update version in ui/build.gradle.kts
  2. Run ./gradlew :ui:publish
  3. Release from the Sonatype staging UI
  4. Tag and push: git tag v1.0.0 && git push origin v1.0.0
← Back to all libraries