Components
TestimonialSmall
The TestimonialSmall component is a reusable Angular component for displaying user testimonials with a rating, profile picture, and reviewer details.
Features
- Customizable Rating: Displays a star rating out of 5, dynamically generated based on the input.
- Review Text: Showcases the user's review prominently.
- Reviewer Details: Includes a profile image, name, and platform details.
- Responsive Design: Ensures the testimonial is visually appealing across different screen sizes.
Inputs
The TestimonialSmallComponent provides the following inputs for customization:
rating(number): Number of stars to display (default:5).reviewText(string): Text of the review to display.profileImage(string): URL of the reviewer's profile image.reviewerName(string): Name of the reviewer.followers(string): Number of followers the reviewer has.platform(string): Platform where the reviewer is active (default:'X').
Usage
Step 1: Import the Component
Add the TestimonialSmallComponent to your Angular project by including it in your page or component.
Step 2: Add the Template
Include the component in your template and provide the desired inputs:
Example
Dynamic Data Binding
You can dynamically bind the inputs to properties in your component:
And in your template:
Notes
- The component defaults to a 5-star rating and the platform
'X'if not specified. - Ensure the
profileImageURL is valid for correct rendering. - The star rating dynamically adjusts based on the
ratinginput.