Browse Anvil2 illustrations and use them on Web, React Native, iOS, and Android.
Catalog
Usage
Illustrations are SVGs for empty and outcome states, plus header art. Use Icons for compact glyphs in controls. Compose empty-state layout and copy with the Empty States pattern.Choose a platform, then click a cell to copy that platform’s snippet. Previews follow the docs light and dark theme.
Each illustration has one name. Web uses the named component. React Native imports the baked light and dark SVG. iOS and Android use the generated Anvil2Illustration enum, which picks the light or dark asset from the current appearance.
Named exports read illustration.color.* tokens and follow AnvilProvider. Importing the -light or -dark file under AnvilProvider is deprecated. Use the named export.
import { EmptyStateNoSearchResults } from "@servicetitan/anvil2-illustrations";<EmptyStateNoSearchResults aria-hidden="true" height={200} />;
Set one dimension from the file viewBox and let the other scale. Empty states use height={200}. The viewBox is 453:380.AI Kit does not wrap the tree in AnvilProvider, so the named export’s CSS variables do not theme there. Import the baked -light or -dark SVG and choose the file for the appearance you are rendering.
import NoResultsLight from "@servicetitan/anvil2-illustrations/illustrations/empty-state-no-search-results-light.svg";<img src={NoResultsLight} alt="" width={240} height={180} />;
The file name is the illustration name plus -light.svg or -dark.svg.Compose the SVG with Anvil2 layout primitives.
Illustrations ship as the Anvil2Illustrations product in the anvil2-ios package. Add the Swift package the same way as the other iOS libraries. See Getting Started for iOS.Anvil2Illustration has one case per illustration, named after the file in lower camel case. empty-state-no-search-results is .emptyStateNoSearchResults. header-commercial-location is .headerCommercialLocation. The image resolves to the light or dark asset from the current appearance.
Illustrations ship in com.servicetitan:anvil2-android-illustrations. Add that module the same way as the other Android libraries. See Getting Started for Android.Anvil2Illustration has one entry per illustration, named after the file in Pascal case. empty-state-error is Anvil2Illustration.EmptyStateError. drawableRes resolves to the dark VectorDrawable under the night qualifier and the light VectorDrawable otherwise.
Provide meaningful alt text, or a content description, when the illustration conveys information. Use empty alt or aria-hidden when the adjacent title and body already explain the state. On iOS and Android, pass nil or null for a decorative image.