Article published on Medium
All documentation is available in the docs
In modern app development, the ability to update UI components without deploying new app versions is increasingly important. While solutions like React Native and Flutter offer this capability, they often require learning new frameworks or languages. Compose Remote Layout bridges this gap for Kotlin Multiplatform applications by enabling dynamic UI updates while staying within the Compose ecosystem.
This library was created to solve several key challenges:
- The need for rapid UI iterations without app store submissions
- A/B testing requirements for UI components
- Platform-specific UI customization from a central source
- Real-time UI updates for critical changes
The compose-remote-layout
module provides several core features:
-
Component System
- Built-in support for basic Compose components (Column, Row, Box, Text, Button, Card)
- All components can be defined and modified through JSON
- Component properties map directly to Compose parameters
-
Dynamic Updates
- Load layouts from remote sources (API, Firebase, local files)
- Update UI without app redeployment
- Handle layout changes in real-time
-
Value Binding
- Dynamic text updates using the BindsValue system
- Template-based value substitution
- Real-time value changes support
-
Modifier System
- Comprehensive modifier support matching Compose capabilities
- Scoped modifiers for specific component types
- JSON-based modifier definition
-
Custom Components
- Register custom Composable functions
- Map JSON definitions to custom UI elements
- Pass custom parameters and handle specific logic
-
iOS Support
- Independent iOS implementation using SwiftUI
- Swift Package Manager integration
0221.mp4
Add the dependencies to your build.gradle.kts
:
// Kotlin Multiplatform
implementation("io.github.utsmannn:compose-remote-layout:{version}")
// Choose platform-specific implementations as needed:
implementation("io.github.utsmannn:compose-remote-layout-android:{version}")
implementation("io.github.utsmannn:compose-remote-layout-jvm:{version}")
implementation("io.github.utsmannn:compose-remote-layout-iosx64:{version}")
implementation("io.github.utsmannn:compose-remote-layout-iosarm64:{version}")
implementation("io.github.utsmannn:compose-remote-layout-js:{version}")
For iOS projects without Kotlin Multiplatform, use Swift Package Manager:
Once you have your Swift package set up, adding ComposeRemoteLayoutSwift as a dependency is as easy as adding it to the dependencies value of your Package.swift or the Package list in Xcode.
dependencies: [
.package(url: "https://github.com/utsmannn/compose-remote-layout-swift.git", .upToNextMajor(from: "0.0.1-alpha05"))
]
Or add it via Xcode:
- Open your project in Xcode
- Go to File > Swift Packages > Add Package Dependency
- Enter the package URL:
https://github.com/utsmannn/compose-remote-layout-swift.git
- Select the version you want to use (0.0.1-alpha05)
- Click Finish
- Add
import ComposeRemoteLayoutSwift
to your Swift files - Build your project
See: compose-remote-layout-swift
This library is currently in alpha stage (version {version}) and has several important considerations:
- Production Use: Not recommended for production applications at this time
- API Stability: The API may change significantly between versions
- Performance: Not fully optimized for large-scale applications
- Testing: Limited real-world testing and validation
- Documentation: May be incomplete or subject to changes
We recommend:
- Using this library for experimental projects
- Contributing feedback and bug reports
- Waiting for stable releases before production use
- Testing thoroughly in your specific use case
Please report issues and suggestions through the GitHub repository.