
Generates an interactive gallery of UI components from story files via a Gradle plugin, enabling isolated component development, preview app generation, and compiler/runtime integration.
Component-driven UI development and story gallery for Compose Multiplatform.
[!NOTE] Fork Notice: This is a maintained fork of Kotlin/Storytale supporting Kotlin 2.3+, Compose Multiplatform 1.10+, AGP 9.1+, and Maven Central distribution. It will be archived once upstream is officially released.
Storytale isolates your @Composable components and compiles a standalone, interactive component gallery app running across Android, iOS, Desktop (JVM), and Web (Wasm).
Your first story ↗ | Read the Documentation ↗ | Live Web Gallery Demo ↗
Storytale is published to Maven Central and the Gradle Plugin Portal.
[versions]
storytale = "0.0.6"
[plugins]
storytale = { id = "io.github.aryapreetam.storytale", version.ref = "storytale" }In your shared UI module (composeApp/build.gradle.kts or shared/build.gradle.kts):
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.storytale)
}Ensure mavenCentral() and gradlePluginPortal() are declared in your settings.gradle.kts.
Storytale isolates gallery and test code in dedicated story source sets alongside production code:
shared/
└── src/
├── commonMain/kotlin/… # Production components
└── commonStories/kotlin/ # Story definitions
Use commonStories for stories shared across all platforms, or target-specific sets like androidStories, iosStories, desktopStories, or wasmStories.
In src/commonStories/kotlin/PrimaryButton.story.kt:
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import org.jetbrains.compose.storytale.story
@Composable
fun PrimaryButton(onClick: () -> Unit, enabled: Boolean = true) {
Button(onClick = onClick, enabled = enabled) {
Text("Click me!")
}
}
val `Primary Button default state` by story {
val enabled by parameter(true)
PrimaryButton(onClick = {}, enabled = enabled)
}Execute the runner task for your target platform:
# Desktop (JVM)
./gradlew desktopStoriesRun # OR ./gradlew jvmStoriesRun
# Web (Wasm)
./gradlew wasmJsBrowserStoriesDevelopmentRun
# Android (device or emulator)
./gradlew androidStoriesRun
# iOS Simulator
./gradlew iosSimulatorArm64StoriesRun| Component | Supported Version | Notes |
|---|---|---|
| Kotlin |
2.3.0+ |
Compatible with FIR K2 compiler plugin ABI. |
| Compose Multiplatform |
1.8.0 – 1.12.x
|
Verified on 1.10.1 and 1.12.0. |
| Android Gradle Plugin |
8.8.0 – 9.1.0
|
Compatible with AGP 9.1 and Kotlin Multiplatform Android libraries. |
| Gradle |
8.10 – 9.3+
|
Configuration-cache compatible tasks. |
| JDK Host |
17 or 21
|
Required for Gradle daemon and Kotlin compiler execution. |
Full guides and references are hosted at aryapreetam.github.io/storytale:
# Publish artifacts to local Maven repository
./gradlew publishToMavenLocal
# Run checks across all modules
./gradlew checkStorytale is distributed under the Apache 2.0 License.
Upstream repository: Kotlin/Storytale.
Component-driven UI development and story gallery for Compose Multiplatform.
[!NOTE] Fork Notice: This is a maintained fork of Kotlin/Storytale supporting Kotlin 2.3+, Compose Multiplatform 1.10+, AGP 9.1+, and Maven Central distribution. It will be archived once upstream is officially released.
Storytale isolates your @Composable components and compiles a standalone, interactive component gallery app running across Android, iOS, Desktop (JVM), and Web (Wasm).
Your first story ↗ | Read the Documentation ↗ | Live Web Gallery Demo ↗
Storytale is published to Maven Central and the Gradle Plugin Portal.
[versions]
storytale = "0.0.6"
[plugins]
storytale = { id = "io.github.aryapreetam.storytale", version.ref = "storytale" }In your shared UI module (composeApp/build.gradle.kts or shared/build.gradle.kts):
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.storytale)
}Ensure mavenCentral() and gradlePluginPortal() are declared in your settings.gradle.kts.
Storytale isolates gallery and test code in dedicated story source sets alongside production code:
shared/
└── src/
├── commonMain/kotlin/… # Production components
└── commonStories/kotlin/ # Story definitions
Use commonStories for stories shared across all platforms, or target-specific sets like androidStories, iosStories, desktopStories, or wasmStories.
In src/commonStories/kotlin/PrimaryButton.story.kt:
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import org.jetbrains.compose.storytale.story
@Composable
fun PrimaryButton(onClick: () -> Unit, enabled: Boolean = true) {
Button(onClick = onClick, enabled = enabled) {
Text("Click me!")
}
}
val `Primary Button default state` by story {
val enabled by parameter(true)
PrimaryButton(onClick = {}, enabled = enabled)
}Execute the runner task for your target platform:
# Desktop (JVM)
./gradlew desktopStoriesRun # OR ./gradlew jvmStoriesRun
# Web (Wasm)
./gradlew wasmJsBrowserStoriesDevelopmentRun
# Android (device or emulator)
./gradlew androidStoriesRun
# iOS Simulator
./gradlew iosSimulatorArm64StoriesRun| Component | Supported Version | Notes |
|---|---|---|
| Kotlin |
2.3.0+ |
Compatible with FIR K2 compiler plugin ABI. |
| Compose Multiplatform |
1.8.0 – 1.12.x
|
Verified on 1.10.1 and 1.12.0. |
| Android Gradle Plugin |
8.8.0 – 9.1.0
|
Compatible with AGP 9.1 and Kotlin Multiplatform Android libraries. |
| Gradle |
8.10 – 9.3+
|
Configuration-cache compatible tasks. |
| JDK Host |
17 or 21
|
Required for Gradle daemon and Kotlin compiler execution. |
Full guides and references are hosted at aryapreetam.github.io/storytale:
# Publish artifacts to local Maven repository
./gradlew publishToMavenLocal
# Run checks across all modules
./gradlew checkStorytale is distributed under the Apache 2.0 License.
Upstream repository: Kotlin/Storytale.