Use Custom SVG Icons in Jetpack Compose
For app icons, toolbar actions, and empty states, converting SVG to Kotlin keeps the asset close to your Compose UI and avoids a VectorDrawable XML step.
Recommended workflow
- Export a clean SVG from your design tool.
- Convert it with the SVG to Compose tool.
- Copy the generated
ImageVectorinto an icons package. - Use it with Compose
IconorImage.
Usage snippet
Icon(
imageVector = MyIcon,
contentDescription = null
)