★★★★☆
I really enjoyed the experience of working with such a cool library like this.
Jonny Cool
CEO at CoolCompany
The Testimonial Card Component is a customizable UI element designed to display testimonials in an engaging and visually appealing manner. It features a star rating system, alongside the name, title, and description associated with the testimonial. This component is ideal for showcasing customer feedback, reviews, or endorsements on your website or application, contributing to increased credibility and trustworthiness.
The component accepts the following props for customization:
<TestimonialCard
stars="4"
name="Jane Doe"
title="CEO at ExampleCorp"
description="This product has transformed our workflow for the better. Highly recommended for teams looking for efficiency!"
/>
To integrate the Testimonial Card Component into your Vue or Nuxt application:
<script setup lang="ts">
import { computed } from 'vue';
interface PropsInterface {
stars: number;
name: string;
title: string;
description: string;
}
const props = defineProps<PropsInterface>();
const starRating = computed(() => {
const filledStars = '★'.repeat(props.stars);
const unfilledStars = '☆'.repeat(5 - props.stars);
return filledStars + unfilledStars;
});
</script>
<template>
<div class="my-md flex justify-center">
<div
class="flex w-72 flex-col rounded-lg bg-black p-4 text-start text-primary dark:bg-primary dark:text-black"
>
<div class="flex flex-col text-base">
<div>
<p class="text-xl font-bold">{{ starRating }}</p>
</div>
<p class="mt-2">{{ description }}</p>
<p class="mt-4 font-bold">{{ name }}</p>
<p>{{ title }}</p>
</div>
</div>
</div>
</template>