Testimonial

Display user feedback with author info, avatar, and verified badge.

Installation

pnpm dlx shadcn-svelte@latest add http://sveltekit-prerender/r/testimonial.json

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.

NameTypeDefaultDescription
childrenSnippetundefinedContent rendered inside the selected testimonial primitive.
classstringundefinedAdditional classes applied to the primitive element.
refHTMLElement | nullnullBindable reference to the primitive's underlying element.

TestimonialAvatarImg

Image primitive used inside TestimonialAvatar.

NameTypeDefaultDescription
srcstringundefinedAvatar image URL.
altstringundefinedAccessible alternative text for the avatar.
classstringundefinedAdditional classes applied to the image.
refHTMLImageElement | nullnullBindable reference to the image element.