Interactive testing environment for react-shared components
Current: Default
A scrollable carousel of user testimonials with expandable modal view for full reviews.
Explore user reviews with scrollable carousel and modal view
Different review configurations for various scenarios
reviewsReview[] - Array of review objects (required)
isPreviewboolean - Preview mode (disables interactions) (default: false)
classNamestring - Additional CSS classes
onAnalytics(event: string, data?: Record<string, unknown>) => void - Analytics callback for tracking user interactions
onModalOpen(isOpen: boolean) => void - Callback when modal opens/closes
interface Review {
rating: number; // 1-5 star rating
name: string; // Reviewer name
description: string; // Review text
image?: string; // Optional profile image URL
}Scrolling Behavior: The component automatically detects overflow and shows navigation arrows. On mobile, clicking arrows scrolls 1 card; on desktop, it scrolls 2 cards.
Text Truncation: Review descriptions are automatically clamped to 4 lines. If text overflows, a "Show More" button appears that opens the full review in a modal.
Modal Navigation: When viewing a review in the modal, users can navigate to previous/next reviews using arrow buttons without closing the modal.
Analytics Events: The component fires analytics events for: testimonial-show-more-click, testimonial-click-left, and testimonial-click-right.
Profile Images: If no image is provided, the ReviewCard component will display the user's initials as a fallback.
Preview Mode: Set isPreview to true to disable all interactions (useful for admin previews or static displays).
Accessibility: Navigation buttons are properly disabled when at the start/end of the carousel, with visual opacity changes.