Compose Multiplatform open source icon collections. Available platforms: Android, iOS, Desktop (JVM), Web (Wasm)
Android | iOS | Desktop | Web |
---|---|---|---|
Available in Maven Central
repositories {
mavenCentral()
}
Add it to your project, see the table below for the corresponding version.
kotlin {
sourceSets {
commonMain {
dependencies {
implementation("com.woowla.compose.icon.collections:{artifact}:{version}")
}
}
}
}
In your code, use the icons like this:
Icon(imageVector = Octicons.Home16, contentDescription = null)
Icon(imageVector = Tabler.Filled.HospitalCircle, contentDescription = null)
Icon(imageVector = Tabler.Outline.HospitalCircle, contentDescription = null)
See all available icons on the GitHub Pages, only the latest published version is available.
The same version numbers as the official icon packs have been followed
Icon Pack | Artifact | Version | License |
---|---|---|---|
Tabler | tabler | ||
Octicons | octicons | ||
Remix Icon | remix | ||
Boxicons | boxicons | ||
Feather | feather | ||
Ionicons | ionicons | ||
Font Awesome | fontawesome | ||
Heroicons | heroicons | ||
Simple icons | simpleicons | ||
Bootstrap icons | twbs |
Download task
Download tasks are executed to update the icons, the process is as follows:
- The icons are downloaded from the official repositories
- The SVG files are converted to Compose using SVG to compose and saved in the corresponding module
- Documentation is generated and saved in the docs folder
- The version is updated in the
build.gradle
file - (Optional) The changes are committed to the repository
Auto update
The Update icons workflow will update the icons automatically every 2 weeks. Right now, it only updates icons that have GitHub releases, so there are some icons that should be updated manually
Special cases
Typically, all icon download tasks retrieve icons from GitHub releases. However, there are a few exceptions:
- boxicons: Downloads icons directly from the main branch for this reason this is not updated automatically, a manual update required.
- ionicons: Uses a custom
afterDownload
andgitHubUrlProvider
function to categorize icons. Additionally, there is an issue with theSquare
value fromStrokeCap
in the generated image vectors. This must be manually replaced withStrokeCap.Square
to avoid conflicts with an icon namedSquare
. - fontawesome: Implements a custom
iconNameTransformer
to handle conflicts between theFontAwesome
icon and its accessor name. - simpleicons: Uses a custom
afterDownload
function to remove thelerna.svg
icon because it throwsMethodTooLargeException
when compiling the project.
- Android Studio
- Kotlin Multiplatform Plugin
- Java 17
- Icon pack using GitHub releases: Run the icon download task, use the
-Pgitcommit
flag to commit the changes. - Icon pack using the main branch: Run the icon download task, manually update the version in the
build.gradle
file, and commit the changes.
- Add new module
- Create a new module by copying the
build.gradle
from an existing module. Copyocticons
if the icon pack uses GitHub releases orboxicons
if it uses the main branch. - Update everything needed like the version,
download-icons
task, and others from thebuild.gradle
- Create a new module by copying the
- Update workflows
- Add new input option in deploy.yml
- If the icon pack uses GitHub releases, add the new task in update-icons.yml
- Update readme
- Add a new entry in the Icon packs section
- If a special case has been added, add a note in the Special cases section
Right now the only way to test is by running the sample app, follow these steps:
- Replace the icons dependency you would like to test in build.gradle.kts file
- Add
AllIcons
to theicons
list in the App.kt file - Run the sample app and check the icons
- The folder .run contains all the necessary tasks to download the icons and run the sample apps (Android/iOS/Desktop/Web)
- Download icons tasks with update docs and version:
./gradlew <module>:download-icons
./gradlew <module>:download-icons -Pgitcommit
use the-Pgitcommit
flag to commit the changes./gradlew download-icons
to download all the icons, just in case do not use with the-Pgitcommit
flag
- Verification: Verify the icons, it must be run manually before merge a pull request
- Deploy: Deploy the main branch to Maven Central
- Update icons: Update the icons automatically, not all icons can be updated automatically
- How to run and create multiplatform project
- Multiplatform library template, from Kotlin
- Multiplatform library template, from github.com/Tweener/kmplate-lib
- Multiplatform app template
- Publish Kotlin/Wasm to GitHub Pages
- SVG to compose