# CardImage Component Documentation ## Overview The CardImage component is a responsive card implementation following the XRPL Brand Design System (BDS). It displays an image, title, subtitle, and call-to-action button with three responsive size variants that adapt to viewport width. ## Features - **Three Responsive Variants**: LG (≥992px), MD (576px-991px), SM (<576px) - **Interactive States**: Default, Hover, Focus, Pressed, Disabled - **Button Animation on Card Hover**: Hovering the card triggers the button's hover animation - **Flexible Usage**: Supports both link navigation and click handlers - **Accessibility**: Keyboard navigation and screen reader support ## Props API ```typescript interface CardImageProps { /** Image source URL */ image: string; /** Alt text for the image */ imageAlt: string; /** Card title (1 line only) */ title: string; /** Card subtitle (max 3 lines). `\n` renders as a line break; an all-bullet subtitle renders as a list. */ subtitle: string; /** Button label text */ buttonLabel: string; /** Link destination (renders card as clickable link) */ href?: string; /** Click handler for the button */ onClick?: () => void; /** Disabled state */ disabled?: boolean; /** Optional className for custom styling */ className?: string; /** When true, image fills entire container with object-fit: cover (no visible background) */ fullBleed?: boolean; /** Custom background color for image container (defaults to gray-100) */ backgroundColor?: string; } ``` ### Default Values - `disabled`: `false` - `className`: `''` - `fullBleed`: `false` - `backgroundColor`: `undefined` (falls back to the gray-100 image background) ## Subtitle Formatting `subtitle` is a plain string, but it is not rendered blindly: - Lines are split on `\n`, and blank lines are dropped. - If **every** line begins with a bullet marker (`•`, `-`, or `*`), the subtitle renders as a `