Display user feedback with author info, avatar, and verified badge.
Installation
Copy the Source Code
Copy and paste the following code into your project:
index.ts
testimonial-author-name.svelte
testimonial-author-tagline.svelte
testimonial-author.svelte
testimonial-avatar-img.svelte
testimonial-avatar-ring.svelte
testimonial-avatar.svelte
testimonial-quote.svelte
testimonial-verified-badge.svelte
testimonial.svelte
Usage
usage.svelte
Features
- Composable testimonial layout with quote, author info, and avatar
- Built-in verified badge for the author name
- Composable via Testimonial, TestimonialAuthor, TestimonialAvatar, and related subcomponents
Props
Testimonial layout components
Shared API for Testimonial, Author, AuthorName, AuthorTagline, Avatar, AvatarRing, Quote, and VerifiedBadge.
| Name | Type | Default | Description |
|---|---|---|---|
children | Snippet | undefined | Content rendered inside the selected testimonial primitive. |
class | string | undefined | Additional classes applied to the primitive element. |
ref | HTMLElement | null | null | Bindable reference to the primitive's underlying element. |
TestimonialAvatarImg
Image primitive used inside TestimonialAvatar.
| Name | Type | Default | Description |
|---|---|---|---|
src | string | undefined | Avatar image URL. |
alt | string | undefined | Accessible alternative text for the avatar. |
class | string | undefined | Additional classes applied to the image. |
ref | HTMLImageElement | null | null | Bindable reference to the image element. |