Open source icons sets for Compose Multiplatform — supporting Android, iOS, Desktop (JVM), and 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.gradlefile - (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
afterDownloadandgitHubUrlProviderfunction to categorize icons. Additionally, there is an issue with theSquarevalue fromStrokeCapin the generated image vectors. This must be manually replaced withStrokeCap.Squareto avoid conflicts with an icon namedSquare(see #35). - fontawesome: Implements a custom
iconNameTransformerto handle conflicts between theFontAwesomeicon and its accessor name. - simpleicons: Uses a custom
afterDownloadfunction to remove thelerna.svgicon because it throwsMethodTooLargeExceptionwhen compiling the project.
- Android Studio
- Kotlin Multiplatform Plugin
- Java 17
- Icon pack using GitHub releases: Run the icon download task, use the
-Pgitcommitflag to commit the changes. - Icon pack using the main branch: Run the icon download task, manually update the version in the
build.gradlefile, and commit the changes.
- Add new module
- Create a new module by copying the
build.gradlefrom an existing module. Copyocticonsif the icon pack uses GitHub releases orboxiconsif it uses the main branch. - Update everything needed like the version,
download-iconstask, 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
AllIconsto theiconslist 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 -Pgitcommituse the-Pgitcommitflag to commit the changes./gradlew download-iconsto download all the icons, just in case do not use with the-Pgitcommitflag
- 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