For development, import
ArtifactCard from @servicetitan/anvil2-ai-kit. For design, find it in the AI Kit Web Component Library file.Options
The Artifact Card supports an icon and an optional description.Icon
The icon is a decorative avatar that signals the kind of artifact the card represents.artifactType only accepts document for the time being — the prop stays in place so more kinds can be added later without a breaking change. Omitting artifactType renders the card without an icon — title and description only.
Description
An optional description renders beneath the title as compact body text, providing supporting context about the artifact’s content.Behavior
The entire card surface is a single button. Padding, the trailing caret, and interactivity are fixed and not configurable.Visual States
The card responds to hover, focus, and press with a surface elevation change inherited from the Card component. The focus ring appears on keyboard navigation.Overflow
Long titles and descriptions wrap within the card’s content column. The caret stays aligned to the top of the content area.Usage Guidelines
When to Use
Use the Artifact Card when:- Generated results in the transcript – Atlas generated content during the conversation, and the chat transcript needs a compact entry point to it.
- Opening or downloading a result – Pressing the card opens the full result in the artifact panel or downloads the artifact, depending on what it represents.
When not to use
Avoid using the Artifact Card for:- Content the user retrieved or uploaded – The Artifact Card represents only content Atlas generated. Show an attachment the user sends with the User Media Message.
- Content inside the artifact panel – The Artifact Card lives in the chat transcript only. Use a Tabbed Layout to organize multiple related views inside the panel.
Keyboard Interaction
Users can navigate and activate the Artifact Card using standard keyboard controls.Code
- Implementation
- ArtifactCard Props
Common Examples
To use theArtifactCard, pass a required title and onPress handler. The whole surface is a button, and the title is its accessible name.Artifact type
artifactType selects a decorative icon for "invoice", "message", or "document". Omit it to render no leading icon.Description
Usedescription for compact supporting text. Omit it for a title-only content area.Heading level
titleLevel sets the semantic heading tag from h3 through h6 without changing the visual style. Choose the level that fits the surrounding document outline.Overflow
Long titles and descriptions wrap inside the card.Internationalization
ArtifactCard has no component-owned strings. Localize title and description before passing them to the component.React Accessibility
- The required
titlenames the whole-card button. - The artifact-type icon and trailing arrow are decorative.
- Users activate the focused card with Enter or Space.
titleLevelpreserves document structure independently of visual styling.