React Shared Components

Interactive testing environment for react-shared components

Theme Playground

Current: Default

UserReviews

A scrollable carousel of user testimonials with expandable modal view for full reviews.

Interactive Playground

Explore user reviews with scrollable carousel and modal view

review image

Sarah Johnson

This course completely transformed my approach to web development. The instructor explains complex concepts in a way that's easy to understand, and the hands-on projects really helped solidify my learning.

review image

Michael Chen

Best investment I've made in my career! The content is up-to-date, comprehensive, and practical. I landed my dream job just two months after completing the course.

review image

Emily Rodriguez

Great course with excellent production quality. The pacing is perfect and the community support is amazing. Highly recommend for anyone looking to level up their skills.

review image

David Thompson

I've taken many online courses, but this one stands out. The instructor is knowledgeable, the materials are well-organized, and the real-world examples make everything click.

review image

Jessica Lee

Worth every penny! The course exceeded my expectations. I particularly loved the bonus resources and the lifetime access means I can always come back to refresh my knowledge.

Common Use Cases

Different review configurations for various scenarios

Small Set of Reviews (3)

review image

Alex Morgan

Excellent product! Highly recommend to anyone looking for quality.

review image

Jordan Smith

Very good overall. Met my expectations and then some.

review image

Taylor Brown

Outstanding! Will definitely purchase again.

Reviews Without Profile Images

Anonymous User

Great experience! The quality exceeded my expectations.

Happy Customer

Very satisfied with my purchase. Would recommend.

Verified Buyer

Fantastic! Exactly what I was looking for.

Long Reviews (with "Show More" functionality)

review image

Patricia Williams

I cannot express how much this product has changed my life. From the moment I started using it, I noticed immediate improvements in my workflow. The attention to detail is remarkable, and the customer support team went above and beyond to ensure I had everything I needed. The quality is exceptional, and I've already recommended it to all my colleagues. If you're on the fence about purchasing, don't hesitate - this is absolutely worth every penny and more. I've tried many similar products over the years, but nothing comes close to the value and performance this offers.

review image

Robert Anderson

After extensive research and comparing multiple options, I finally decided to go with this product, and I'm so glad I did. The features are comprehensive, the interface is intuitive, and the results speak for themselves. What really impressed me was how quickly I was able to get up and running - the onboarding process was smooth and well-documented. The community around this product is also incredibly helpful and supportive. I've learned so much from other users and the regular updates show that the team is committed to continuous improvement.

Mixed Star Ratings

review image

Five Star Review

Perfect in every way! Couldn't ask for more.

review image

Four Star Review

Really good, just a few minor things could be improved.

review image

Three Star Review

Decent product, does what it says but nothing exceptional.

review image

Another Five Star

Absolutely love it! Best purchase I've made this year.

API Reference

Props

reviews

Review[] - Array of review objects (required)

isPreview

boolean - Preview mode (disables interactions) (default: false)

className

string - 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

Review Type

tsx
interface Review {
  rating: number;        // 1-5 star rating
  name: string;          // Reviewer name
  description: string;   // Review text
  image?: string;        // Optional profile image URL
}

Features

  • Horizontal scrollable carousel with smooth scrolling
  • Navigation arrows that appear/disappear based on scroll position
  • Automatic text truncation with "Show More" button for long reviews
  • Modal view for expanded review details
  • Modal navigation to browse through reviews without closing
  • Star rating display (1-5 stars)
  • Optional profile images with fallback to initials
  • Responsive design (1 card scroll on mobile, 2 on desktop)
  • Analytics tracking for user interactions
  • Preview mode for disabling interactions

Usage Notes

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.