# PulsoIcon for Android (Jetpack Compose) [← All platforms](../README.md) · [pulsoicon.com](https://pulsoicon.com): browse all icons, try them live and copy the code `com.citypulso:pulsoicon-compose` on Maven Central: the 9955 PulsoIcon icons for Jetpack Compose, with the same props and motion as [`pulsoicon-react`](../packages/react). Android 8.0 (API 26) or newer. ## Install ```kotlin // build.gradle.kts of your app module dependencies { implementation("com.citypulso:pulsoicon-compose:") } ``` ## Quick start ```kotlin import com.citypulso.pulsoicon.PulsoIcon import com.citypulso.pulsoicon.PulsoIcons import com.citypulso.pulsoicon.icons.Bell val interactions = remember { MutableInteractionSource() } IconButton(onClick = { /* … */ }, interactionSource = interactions) { PulsoIcon(PulsoIcons.Bell, contentDescription = "Notifications", interactionSource = interactions) } ``` ## Parameters | Parameter | Default | Description | | --------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------ | | `icon` | | The icon, e.g. `PulsoIcons.Bell` | | `contentDescription` | | Read by TalkBack; `null` when the control around it already has a label | | `size` | `24.dp` | Width and height | | `color` | `LocalContentColor.current` | Stroke colour, and fill colour when `solid` | | `strokeWidth` | `2f` | Stroke width on the 24-unit grid | | `absoluteStrokeWidth` | `false` | Keep the stroke the same number of dp at any size | | `solid` | `false` | Filled icon instead of outline | | `animated` | `true` | `false` keeps the icon completely still | | `autoAnimated` | `true` | Play when the control of `interactionSource` is pressed, hovered or focused | | `play` | `null` | `true` plays the motion, `false` returns to rest | | `handle` | `null` | `rememberPulsoIconHandle()`, whose suspending `startAnimation()` / `stopAnimation()` play it from code | | `interactionSource` | `null` | The interaction source of the button or row the icon sits in | Compose has no "closest interactive ancestor" like the web packages, so pass the control's `interactionSource` to have the icon play with it. Nothing moves when the system turns animations off. ## Finding icons Icons are properties of `PulsoIcons` named like the React components (`PulsoIcons.Calendar`, `PulsoIcons.Trash2`, `PulsoIcons.BrandGithub`), with the same other names and `Icon` suffixes. `PulsoIcons.byKey("bell")` looks an icon up by the kebab-case name stored on your data, and `PulsoIcons.ICON_NAMES` lists them all. Each icon is built only when first used, and R8 removes the icons your app never references. ## Developing The icon files under `pulsoicon/src/main/java/com/citypulso/pulsoicon/icons/` are generated by `npm run gen` at the repository root. `./gradlew :pulsoicon:testDebugUnitTest` checks every icon and recipe against `packages/core`. While working on an app, `includeBuild("../PulsoIcon/kotlin")` in its `settings.gradle.kts` uses this folder instead of Maven Central.