Skip to main content
Illustration picks a named token SVG from @servicetitan/anvil2-illustrations using kebab-case scenario or header context, plus segment and trade. Prefer a named import from @servicetitan/anvil2-illustrations when you already know the artwork. Illustration pulls in every named illustration. The catalog, filenames, and light/dark import paths live on Illustrations.

Installation

Illustration depends on @servicetitan/anvil2-illustrations. Theme follows AnvilProvider through illustration color tokens. There is no mode prop and no light/dark file swap.

Usage

Pass the facts on the component, or set defaults with IllustrationProvider. Props override the provider.

Resolution

Empty states try an exact segment + trade file, then that segment’s evergreen file, then a generic empty state. Generic is used only when segment is omitted. If a segment is present and there is no evergreen file, Illustration renders nothing and warns in development. Headers have no generic fallback. context="project" also needs trade. context="service-agreements" exists only for commercial. Customer and location headers use segment and ignore trade. Missing art returns null.

Accessibility

Illustration stays decorative unless you pass a non-empty alt. That sets role="img" and aria-label. Use empty alt or omit it when adjacent title and body already explain the state.
Remaining SVG attributes such as height forward to the rendered SVG. Empty-state examples use height={200}.

Illustration props

type defaults to "empty-state". scenario is required for empty states. context is required for headers. segment and trade override IllustrationProvider.

IllustrationProvider props

Last modified on September 9, 2026