github chrisbanes/haze 2.0.0-alpha01

10 hours ago

Major architectural refactor introducing a pluggable visual effects system for improved modularity and extensibility.

Highlights

New VisualEffect Interface

Haze now uses a VisualEffect interface that separates the core effect infrastructure from specific effect implementations. This enables better separation of concerns, a smaller core module, and potential for custom visual effects in the future.

New haze-blur Module

All blur functionality has been extracted from the core haze module into a separate haze-blur module:

implementation("dev.chrisbanes.haze:haze:2.0.0-alpha01")
implementation("dev.chrisbanes.haze:haze-blur:2.0.0-alpha01")

New blurEffect {} API

All blur-related properties now require a blurEffect {} wrapper:

Modifier.hazeEffect(state = hazeState) {
  blurEffect {
    blurRadius = 20.dp
    colorEffects = listOf(HazeColorEffect.tint(...))
  }
}

Configurable HazePositionStrategy

New positionStrategy parameter on rememberHazeState() to control how effect positions are calculated, fixing split-window blur misalignment scenarios.

Breaking Changes

  • New module dependency: Blur functionality now requires the haze-blur module
  • API nesting: Blur properties (blurRadius, colorEffects, style, noiseFactor, progressive, mask, etc.) now require blurEffect {} wrapper
  • Package changes: Blur classes moved to dev.chrisbanes.haze.blur package
  • Removed APIs: rememberHazeState(blurEnabled) parameter removed (use blurEffect { blurEnabled = ... })
  • Internal API renames: create*ImageFilter functions renamed to create*RenderEffect
  • Dropped targets: iosX64 and macosX64 targets removed (Compose Multiplatform 1.11 deprecation)

Key Dependencies

  • Kotlin 2.3.20
  • Compose Multiplatform 1.11.0-alpha04

Migration

For detailed migration instructions, see the Migration Guide.

Full Changelog: 1.7.1...2.0.0-alpha01

Don't miss a new haze release

NewReleases is sending notifications on new releases.