Components
TestimonialTriple
The TestimonialTriple component is a reusable Angular component for displaying a collection of testimonials in a responsive grid layout.
Features
- Customizable Title and Subtitle: Easily adjust the section's title and subtitle.
- Dynamic Testimonials: Accepts an array of testimonials with user details and messages.
- Responsive Design: Adapts to various screen sizes with a clean grid layout.
- Avatar Support: Displays user avatars or initials for a personalized touch.
Inputs
The TestimonialTripleComponent provides the following inputs for customization:
title(string): Title of the testimonials section.subtitle(string): Subtitle providing additional context.testimonials(Array): An array of testimonial objects, each with the following structure:message(string): The testimonial text.name(string): The reviewer's name.username(string): The reviewer's username (e.g., social media handle).avatar(string, optional): URL of the reviewer's avatar image. If not provided, the first letter of the name is displayed.
Usage
Step 1: Import the Component
Add the TestimonialTripleComponent 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:
Step 3: Define the Testimonials
Provide an array of testimonials in your component:
Example
Dynamic Data Binding
Bind the inputs dynamically from your component:
And in your template:
Notes
- The component dynamically handles user avatars or falls back to displaying the user's initials.
- Ensure the
testimonialsarray follows the specified structure for consistency.