Tintable icons
A placement can declare that its artwork is a single-color icon. Assetlib delivers the shape, and your app supplies the color when it draws it, from its theme, a selected state, or dark mode.
- Declare
"rendering": "template"on a placement inassetlib.catalog.jsonand regenerate its reference. Placements without the field are unchanged. - Upload the icon as an SVG. One that uses
currentColoris ready as it is; one drawn in a single fixed color is converted, and the console says so. An SVG with more than one color is rejected as a tintable icon. - A tintable placement accepts only tintable icons, and other placements never receive one. Tintable icon placements do not count toward the placements meter.
- Expo apps pass
tintColor, which colors the bundled and the downloaded icon alike. In SwiftUI the SDK applies template rendering and the app setsforegroundStyle; in Compose the app draws the returned bitmap withIconand itstint. - When an SDK finds published artwork whose rendering differs from the placement's, it downloads nothing and keeps showing compatible cached artwork or the bundled icon.
@assetlib/cli0.2.0 also counts Swift call sites such asartwork.travel.coastas references inassetlib sync --references.
- Hosted consoleLiveconsole.assetlib.dev
- JavaScript and Expo SDK0.5.0-preview.1Developer preview. Tarballs on the GitHub release, not npm. Includes @assetlib/cli 0.2.0.
- Swift SDK0.4.0-preview.1Developer preview. Swift Package Manager, exact version.
- Android SDK0.4.0-preview.1Developer preview. AAR and SHA256SUMS on the GitHub release, not Maven Central.
Limits. In-app icons only: launcher icons and launch screens stay in the app binary. Sources must be SVG; PNG and multi-color icons are not supported. Android apps must recompile when they move to the new AAR. Checked with unit and shared contract tests; no iOS simulator, Android emulator, or device run of a tintable icon is claimed.