Beta FeatureThis feature is currently in beta, and needs to be imported from
@servicetitan/anvil2/beta.While we hope to minimize breaking changes, they may occur due to feedback we receive or other improvements. These will always be documented in the changelog and communicated in Slack.Please reach out in the #ask-designsystem channel with any questions or feedback!- Implementation
- InteractiveCard Props
Common Examples
Interactive card provides a clickable card interface that supports visually nested interactive elements without accessibility violations. Use the button variant for actions and the link variant for navigation.Button Card
Use the button variant when the card triggers an action (e.g., expanding content, opening a modal).Link Card
Use the link variant when the card navigates to another page or section.Disabled State
Disable user interaction with thedisabled prop on actionProps. Only available for button cards (not link cards).The
disabled prop only disables the card action layer. Nested interactive elements (buttons, links, etc.) remain fully functional. If you need to disable nested elements to reflect the disabled state, handle that separately in your implementation.React Accessibility
- Uses a
role="group"wrapper witharia-label(viawrapperProps) to describe the card’s content - The interactive layer (button or link) has its own
aria-label(viaactionProps) describing the action - Full keyboard support: Tab to navigate between the card and nested elements, Enter/Space to activate
- Touch-friendly: Handles touch events on mobile devices
- WCAG AA 2.2 compliant: No nested button violations due to sibling structure approach
Dual ARIA Labels
Interactive card requires two ARIA labels to maintain accessibility:wrapperProps["aria-label"]: Describes what the card contains (e.g., “Kitchen Measurement 2 card”)actionProps["aria-label"]: Describes the action that will be taken (e.g., “Expand Kitchen Measurement 2”)