Skip to content

ronjunevaldoz/heroicons-compose

Repository files navigation

heroicons-compose

Maven Central CI Kotlin Compose Multiplatform Platforms License

Heroicons (Tailwind Labs, MIT) compiled to Compose Multiplatform ImageVector — one file per icon, generated, never hand-written path data. Companion project to tailwind-compose, split into its own repo since Heroicons is a separate upstream product from Tailwind CSS itself (different repo, different release cadence, same org).

Install

// build.gradle.kts
dependencies {
    implementation("io.github.ronjunevaldoz:heroicons-outline:<version>")
}

Usage

import androidx.compose.material3.Icon
import io.github.ronjunevaldoz.heroicons.outline.Bell
import io.github.ronjunevaldoz.heroicons.outline.Heart

Icon(imageVector = Bell, contentDescription = "Notifications")
Icon(imageVector = Heart, contentDescription = "Favorite", tint = MaterialTheme.colorScheme.primary)

Every icon is a single val <IconName>: ImageVector by lazy { ... } in its own file — import exactly the icons you use, one at a time.

Modules

Named per Heroicons style variant so a consumer depending on more than one never collides on identical fully-qualified class names (two BellKt.class, two different jars, same package) — each variant gets its own artifactId and package:

  • heroicons-outline — 324 icons, 24×24, line style (io.github.ronjunevaldoz.heroicons.outline)
  • heroicons-solid — not yet built (24×24, filled style)
  • heroicons-mini — not yet built (20×20, filled style)
  • heroicons-micro — not yet built (16×16, filled style)

Build

./gradlew help                 # verify the build resolves
./gradlew ktlintCheck detekt    # lint + static analysis
./gradlew jvmTest               # unit tests

Icons are generated, never hand-edited — see each file's // GENERATED header and scripts/codegen/generate_icons.py to regenerate. Regenerating requires the kotlin-multiplatform-imagevector-generator Claude Code skill installed locally, plus pip install picosvg (real stroke-to-fill conversion — Heroicons ship as stroke-based SVGs, and the base converter has no stroke handling at all, which silently produced solid-blob icons instead of hollow outlines until this was caught by comparing rendered output to the original, not just the converter's exit code).

Publishing

Published to Maven Central under io.github.ronjunevaldoz. See .github/workflows/release.yml.

License

Apache-2.0 for this repo's own code — see LICENSE. The compiled icon art originates from Heroicons (MIT, Tailwind Labs) — see outline/NOTICE.md for the full license text.

About

Heroicons (Tailwind Labs, MIT) compiled to Compose Multiplatform ImageVector

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors