Skip to content

3.0.0-alpha02

Pre-release
Pre-release

Choose a tag to compare

@Moriafly Moriafly released this 23 Aug 04:45
· 29 commits to main since this release

This is the second alpha release of Salt UI 3.0. It refines the cross-platform design system with redesigned button and dialog APIs, a new Card component, native macOS title-bar interactions, platform-aware theme defaults, and scrolling improvements synchronized with Compose 1.12 RC01.

This is a pre-release containing breaking API changes. APIs annotated with @UnstableSaltUiApi may continue to change before the stable 3.0 release.

Installation

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

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

Compatibility

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

Highlights

Redesigned Buttons

Button has been redesigned around appearance, semantic intent, and platform-resolved control sizes:

  • ButtonAppearance.Filled, Subtle, and Plain
  • ButtonIntent.Normal and Destructive
  • ControlSize.Small, Regular, and Large
  • Optional leading icons
  • Flexible RowScope content
  • Platform-specific height, padding, icon size, and spacing
  • Explicit enabled and disabled colors through ButtonColors
Button(
    onClick = { deleteItem() },
    text = "Delete",
    appearance = ButtonAppearance.Filled,
    intent = ButtonIntent.Destructive,
    size = ControlSize.Regular
)

The new LocalControlSize and ProvideControlSize APIs allow containers such as toolbars and dialogs to provide an appropriate control density to their descendants.

Content Style Inheritance

Salt UI now provides composition-local content styling through:

  • LocalContentColor
  • LocalTextStyle
  • ProvideTextStyle

Text and Icon inherit these values by default. Components such as buttons and dialogs can therefore provide their content color and typography without requiring every child to repeat them explicitly.

Refined Adaptive Dialogs

Dialogs now use platform-resolved geometry and presentation:

  • Continuous corner shapes
  • Dual-layer unclipped drop shadows
  • Platform-specific spacing and control density
  • Scroll-safe content for constrained windows
  • Adaptive horizontal or stacked action layouts
  • Equal-width compact actions where appropriate
  • Automatic stacking for narrow widths and accessibility font scales
  • Theme-inherited title and message typography
  • Confirmation and cancellation labels are no longer forced to uppercase

YesDialog, YesNoDialog, and InputDialog now use BasicAdaptiveDialog.

AdaptiveDialogSize.Min resolves to a maximum width of:

  • Desktop: 260.dp
  • Android and iOS: 320.dp

BasicAdaptiveDialog and BasicDialog now disable the platform default width by default, making AdaptiveDialogSize the single source of truth for dialog sizing.

New Card Component

The new experimental Card component provides:

  • Shape clipping
  • Salt UI sub-material backgrounds
  • Fallback colors
  • Hairline theme borders
  • Custom shapes and transparent styling
Card {
    // Content
}

Native macOS Title-Bar Interaction

The macOS window implementation now installs and manages its title bar directly through AppKit.

This release adds:

  • Native caption-bar window dragging
  • Double-click caption-bar maximize and restore
  • Full-screen transition handling
  • Caption-bar hit testing for windows and dialogs
  • Constraint-based native title-bar layout
  • A macOS default caption-bar height of 52.dp

Windows and Linux continue to use a default caption-bar height of 40.dp.

Linux caption buttons now use consistently drawn vector-style icons instead of font-dependent glyphs.

Platform Design Refinements

  • Added native-style light and dark background defaults for iOS.
  • Increased the default Android medium and large corner radii.
  • Aligned iOS title-bar typography with the platform.
  • Reduced the default desktop item height from 48.dp to 32.dp.
  • Removed the forced bold weight from ItemButton labels.

Scrolling and Lazy Layouts

Salt UI's Foundation implementation has been synchronized with Compose 1.12 RC01 while preserving Salt UI's custom overscroll behavior.