Skip to content

3.0.0-beta01

Pre-release
Pre-release

Choose a tag to compare

@Moriafly Moriafly released this 06 Sep 12:11
· 26 commits to main since this release

This is the first beta release of Salt UI 3.0. It introduces screen-level cards, a redesigned switch animation, Linux window shadows, and desktop resizing improvements, with dependencies updated to Compose 1.12.0.

The changes below are relative to 3.0.0-alpha02.

Breaking changes are included in this beta. APIs marked @UnstableSaltUiApi remain subject to revision until Salt UI 3.0 is stable.

Installation

commonMain.dependencies {
    implementation("io.github.moriafly:salt-ui:3.0.0-beta01")

    // Optional Navigation 3 integration
    implementation("io.github.moriafly:salt-ui-navigation:3.0.0-beta01")
}

Compatibility

  • Kotlin: 2.3.21
  • Compose Multiplatform: 1.12.0
  • Jetpack Compose: 1.12.0
  • Android minSdk: 23
  • Android compileSdk: 37

Highlights

New ScreenCard Component

ScreenCard combines a section header, a card container, and supporting footer text into a single component.

It provides:

  • Optional header and footer text
  • Theme-based outer spacing
  • Configurable shape, background color, and border
  • Vertically arranged content through ColumnScope
ScreenCard(
    header = "Appearance",
    footer = "Changes apply immediately."
) {
    ItemSwitcher(
        state = darkTheme,
        onChange = { darkTheme = it },
        text = "Dark theme"
    )
}

ScreenCard does not add inner content padding or consume BasicScreen content padding. Apply the screen's padding values to the surrounding content container.

Configurable Cards

Card now exposes its default appearance through CardDefaults:

  • CardDefaults.shape
  • CardDefaults.color
  • CardDefaults.border

The new nullable border parameter controls the border independently of the background material.

Redesigned Switcher Animation

Switcher now morphs between an unchecked ring and a checked vertical bar, with coordinated movement and background-color transitions.

The animation preserves right-to-left layout support and uses the current Salt UI theme colors.

Switcher remains a visual indicator. Use ItemSwitcher for interactive rows with input handling and accessibility semantics.

The demo now includes a Components screen with basic, descriptive, icon, and disabled ItemSwitcher examples.

Linux Window Shadows

SaltWindow and SaltDialogWindow now provide client-drawn shadows and rounded content when using WindowDecoration.SystemDefault on systems supporting per-pixel translucency.

This release also improves:

  • Window snapping and positioning relative to visible content through _GTK_FRAME_EXTENTS
  • Pointer input passing through the transparent shadow area on X11
  • Resize hit regions at content edges and corners
  • Shadow removal when windows are maximized or fullscreen

Explicitly undecorated windows and systems without per-pixel translucency retain the undecorated appearance.

Windows Live Resizing

Fixed resize message forwarding to preserve the native window procedure chain, including Skiko's Direct3D live-resize handling, while retaining Salt UI's custom client-area bounds.

Rendering and Recomposition

  • Cached gradient brushes in Modifier.verticalEdge and Modifier.horizontalEdge between draw passes.
  • Clarified the offscreen graphics layer requirement for edge fade modifiers.
  • Reduced unnecessary recomposition of unrelated window content when LocalSaltWindowProperties changes.

Breaking Changes and Migration

Card Layout and Parameters

Card now uses ColumnScope instead of BoxScope and arranges children vertically.

Wrap content in a Box when overlapping children or box-specific alignment is required.

The parameter order is now:

Card(
    modifier = ...,
    shape = ...,
    color = ...,
    border = ...
) {
    // Content
}

Update positional calls to match the new order, or use named arguments.

Card Background and Border

color = Color.Unspecified now disables only the background material. To remove both the material background and border, use:

Card(
    color = Color.Unspecified,
    border = null
) {
    // Content
}

Content is still clipped to the card's shape.

Dependency Updates

  • Updated Compose Multiplatform from 1.12.0-rc01 to 1.12.0.
  • Updated the corresponding Jetpack Compose dependencies to 1.12.0.
  • Added Compose UI tooling to the Android runtime classpath for previews.

Full Changelog: 3.0.0-alpha02...3.0.0-beta01