Skip to main content

Common Examples

Basic Usage

Render an artifact trigger with a title and description:

Active State

Pass active while the corresponding ArtifactPanel is open so the card shows the elevated visual state:

Pairing with ArtifactPanel

Wire the card’s onClick to the consumer state that drives an ArtifactPanel:

React Accessibility

  • The card renders as a role="group" wrapping an interactive button via Anvil2’s InteractiveCard. The whole surface is clickable.
  • The title is used for both the wrapper’s aria-label and the action button’s aria-label (prefixed with “View ”).
  • artifactId is emitted as data-artifact-id for analytics and event wiring; it is not announced to assistive technology.
Last modified on May 8, 2026