ComposeMarkdownMultiplatform

Declarative Compose Markdown renderer using CommonMark parsing, modular plugin architecture for tables/images/HTML, themeable typography/colors, and extensible parser extensions for customizable rendering.

Android JVMJVMKotlin/NativeWasm
GitHub stars1
Authorsfeiyin0719
Open issues0
LicenseMIT License
Creation dateabout 1 month ago

Last activity24 days ago
Latest release0.1.8 (9 days ago)

Compose Markdown Multiplatform

English | 简体中文

A Compose Multiplatform Markdown rendering library that supports Android, iOS, Desktop (JVM), and WebAssembly (Wasm).

Looking for Android-only with richer Markdown compatibility? Check out ComposeMarkdown — it offers deeper Markdown spec support (powered by Flexmark) and more rendering features for Android projects.

Sample Screenshots

Desktop Android WebAssembly (Wasm)
Desktop Android WasmJS

Features

  • Kotlin Multiplatform — Single codebase for Android, iOS, Desktop, and Web
  • Compose Multiplatform — Built on JetBrains Compose Multiplatform
  • CommonMark Support — Powered by commonmark-kotlin parser (pure Kotlin Multiplatform)
  • Plugin System — Modular plugin architecture for tables, images, HTML, and more; supports custom parser extensions
  • Customizable Themes — Full control over typography, colors, and component styles

Supported Platforms

Platform Status
Android Supported
iOS (arm64, x64, simulator) Supported
Desktop (JVM) Supported
WebAssembly (Wasm) Supported

Installation

System Requirements

  • Kotlin: 2.0.21+
  • Compose Multiplatform: Latest
  • Android API: 24+ (Android 7.0)
  • Java: 11+

Add Dependency

Add the dependency to your project's build.gradle.kts:

// In your shared module's build.gradle.kts
kotlin {
    sourceSets {
        val commonMain by getting {
            dependencies {
                implementation("io.github.feiyin0719:markdown-multiplatform:<version>")
            }
        }
    }
}

Plugin Modules

Plugin Artifact Description
Table markdown-multiplatform-table GFM table support
Image markdown-multiplatform-image Markdown image rendering
HTML markdown-multiplatform-html HTML inline tag support
dependencies {
    implementation("io.github.feiyin0719:markdown-multiplatform-table:<version>")
    implementation("io.github.feiyin0719:markdown-multiplatform-image:<version>")
    implementation("io.github.feiyin0719:markdown-multiplatform-html:<version>")
}

Quick Start

import io.github.feiyin0719.markdown.multiplatform.MarkdownView

@Composable
fun SimpleMarkdownExample() {
    val markdownContent = """
        # Hello Compose Markdown Multiplatform

        This is a **cross-platform** Markdown rendering library.

        - Android
        - iOS
        - Desktop
        - Web (Wasm)
    """.trimIndent()

    MarkdownView(
        content = markdownContent,
        modifier = Modifier.fillMaxSize(),
    )
}

Tech Stack

Technology Purpose
Compose Multiplatform Cross-platform UI framework
commonmark-kotlin Markdown parsing engine (pure Kotlin Multiplatform)
Kotlin Coroutines Asynchronous processing
Material Design 3 Design language specification

API Reference

For full API signatures and detailed parameter explanations, see the dedicated API document:

Contributing

We welcome contributions! To get started:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feat/my-feature
  3. Make your changes
  4. Format code: ./gradlew ktlintFormat
  5. Run checks: ./gradlew ktlintCheck
  6. Build: ./gradlew assemble
  7. Commit using conventional prefixes (feat:, fix:, docs:, etc.)
  8. Open a Pull Request

License

Released under the MIT License. See LICENSE for details.


Back to top

Made with love by the Compose Markdown team

Android JVMJVMKotlin/NativeWasm
GitHub stars1
Authorsfeiyin0719
Open issues0
LicenseMIT License
Creation dateabout 1 month ago

Last activity24 days ago
Latest release0.1.8 (9 days ago)

Compose Markdown Multiplatform

English | 简体中文

A Compose Multiplatform Markdown rendering library that supports Android, iOS, Desktop (JVM), and WebAssembly (Wasm).

Looking for Android-only with richer Markdown compatibility? Check out ComposeMarkdown — it offers deeper Markdown spec support (powered by Flexmark) and more rendering features for Android projects.

Sample Screenshots

Desktop Android WebAssembly (Wasm)
Desktop Android WasmJS

Features

  • Kotlin Multiplatform — Single codebase for Android, iOS, Desktop, and Web
  • Compose Multiplatform — Built on JetBrains Compose Multiplatform
  • CommonMark Support — Powered by commonmark-kotlin parser (pure Kotlin Multiplatform)
  • Plugin System — Modular plugin architecture for tables, images, HTML, and more; supports custom parser extensions
  • Customizable Themes — Full control over typography, colors, and component styles

Supported Platforms

Platform Status
Android Supported
iOS (arm64, x64, simulator) Supported
Desktop (JVM) Supported
WebAssembly (Wasm) Supported

Installation

System Requirements

  • Kotlin: 2.0.21+
  • Compose Multiplatform: Latest
  • Android API: 24+ (Android 7.0)
  • Java: 11+

Add Dependency

Add the dependency to your project's build.gradle.kts:

// In your shared module's build.gradle.kts
kotlin {
    sourceSets {
        val commonMain by getting {
            dependencies {
                implementation("io.github.feiyin0719:markdown-multiplatform:<version>")
            }
        }
    }
}

Plugin Modules

Plugin Artifact Description
Table markdown-multiplatform-table GFM table support
Image markdown-multiplatform-image Markdown image rendering
HTML markdown-multiplatform-html HTML inline tag support
dependencies {
    implementation("io.github.feiyin0719:markdown-multiplatform-table:<version>")
    implementation("io.github.feiyin0719:markdown-multiplatform-image:<version>")
    implementation("io.github.feiyin0719:markdown-multiplatform-html:<version>")
}

Quick Start

import io.github.feiyin0719.markdown.multiplatform.MarkdownView

@Composable
fun SimpleMarkdownExample() {
    val markdownContent = """
        # Hello Compose Markdown Multiplatform

        This is a **cross-platform** Markdown rendering library.

        - Android
        - iOS
        - Desktop
        - Web (Wasm)
    """.trimIndent()

    MarkdownView(
        content = markdownContent,
        modifier = Modifier.fillMaxSize(),
    )
}

Tech Stack

Technology Purpose
Compose Multiplatform Cross-platform UI framework
commonmark-kotlin Markdown parsing engine (pure Kotlin Multiplatform)
Kotlin Coroutines Asynchronous processing
Material Design 3 Design language specification

API Reference

For full API signatures and detailed parameter explanations, see the dedicated API document:

Contributing

We welcome contributions! To get started:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feat/my-feature
  3. Make your changes
  4. Format code: ./gradlew ktlintFormat
  5. Run checks: ./gradlew ktlintCheck
  6. Build: ./gradlew assemble
  7. Commit using conventional prefixes (feat:, fix:, docs:, etc.)
  8. Open a Pull Request

License

Released under the MIT License. See LICENSE for details.


Back to top

Made with love by the Compose Markdown team