Skip to main content

Common Examples

To use the Card, import it from @servicetitan/anvil2-rn and pass content through the required content prop. The kit forbids children. A plain string or number is wrapped in Text for you.

Card type

Props select one of two card types:
  • Omit onPress for a static surface.
  • Pass onPress and a required label for a button card.
The React Native surface does not include a link card (href) or the web highlighted glow.

Padding

padding is "snug", "base", or "relaxed". "base" is the default.

Accessibility

  • A static card is a non-interactive surface.
  • A button card uses accessibilityRole="button", label as accessibilityLabel, and accessibilityState.disabled when isDisabled is set.
Last modified on September 1, 2026