TestimonialBlock

Composable testimonial card for ratings, review quotes, reviewer metadata, and optional media.

Quick Preview

5.01 Google review
Their team elevated our brand with thoughtful design and sharp strategy — a cohesive, compelling identity we're proud of.
MR
Mark RamirezOwner, Luna's Inc

Composition

Use the public subpath import and compose only the slots you need. TestimonialBlock is product-agnostic; keep routing, analytics, and review provider logic in the consuming app.

TestimonialBlock
├── TestimonialBlockMedia
│   └── TestimonialBlockPlayButton
├── TestimonialBlockContent
│   ├── TestimonialBlockRating
│   ├── TestimonialBlockQuote
│   └── TestimonialBlockFooter
│       ├── TestimonialBlockReviewer
│       └── TestimonialBlockAction

Usage

import {
  TestimonialBlock,
  TestimonialBlockQuote,
  TestimonialBlockRating,
} from "@giddaa-housing/ui/testimonial-block";

<TestimonialBlock>
  <TestimonialBlockRating rating={5} source="Google" totalReviews={1} />
  <TestimonialBlockQuote>
    Their team elevated our brand with thoughtful design and sharp strategy.
  </TestimonialBlockQuote>
</TestimonialBlock>;

Examples

Default Testimonial Block

5.01 Google review
Their team elevated our brand with thoughtful design and sharp strategy — a cohesive, compelling identity we're proud of.
MR
Mark RamirezOwner, Luna's Inc

Tones

Use neutral for standard cards and brand for filled hero treatments.

5.01 Google review
Their team elevated our brand with thoughtful design and sharp strategy — a cohesive, compelling identity we're proud of.
MR
Mark RamirezOwner, Luna's Inc

Neutral

5.01 Google review
Their team elevated our brand with thoughtful design and sharp strategy — a cohesive, compelling identity we're proud of.
MR
Mark RamirezOwner, Luna's Inc

Brand

Orientation

Use horizontal when media should sit beside the testimonial copy on wider layouts. The example composes TestimonialBlockPlayButton as the trigger for Video Player Dialog, keeping playback behavior outside the testimonial primitive.

5.01 Google review
Their team elevated our brand with thoughtful design and sharp strategy — a cohesive, compelling identity we're proud of.
MR
Mark RamirezOwner, Luna's Inc

Vertical

5.01 Google review
Their team elevated our brand with thoughtful design and sharp strategy — a cohesive, compelling identity we're proud of.
MR
Mark RamirezOwner, Luna's Inc

Horizontal

Sizes

The size prop scales spacing, type, avatar, media, and action affordances.

5.01 Google review
Their team elevated our brand with thoughtful design and sharp strategy — a cohesive, compelling identity we're proud of.
MR
Mark RamirezOwner, Luna's Inc

Sm

5.01 Google review
Their team elevated our brand with thoughtful design and sharp strategy — a cohesive, compelling identity we're proud of.
MR
Mark RamirezOwner, Luna's Inc

Md

5.01 Google review
Their team elevated our brand with thoughtful design and sharp strategy — a cohesive, compelling identity we're proud of.
MR
Mark RamirezOwner, Luna's Inc

Lg

Props

Prop/APITypeDefaultDescription
tone"neutral" | "brand""neutral"Switches the card surface, foreground, and action contrast.
orientation"vertical" | "horizontal""vertical"Controls media/copy layout. Horizontal stacks on small screens.
size"sm" | "md" | "lg""md"Scales internal density and media height.
TestimonialBlockRating.ratingnumberrequiredRating value clamped to the 0-5 range and rendered as the score/stars.
TestimonialBlockRating.sourceReactNode-Optional review source. Hidden when omitted.
TestimonialBlockRating.totalReviewsnumber-Optional review count rendered with the source when provided.
TestimonialBlockRating.reviewLabelstring"review" / "reviews"Overrides the generated review-count label.
TestimonialBlockRating.showScorebooleantrueHides the numeric score when set to false.
TestimonialBlockReviewer.namestringrequiredReviewer name rendered beside the avatar.
TestimonialBlockReviewer.photostring-Optional reviewer photo. Falls back to initials from name.
TestimonialBlockReviewer.reviewerRoleReactNode-Optional reviewer role, title, or company line.
renderBase UI render prop-Changes the rendered element while preserving styles.
classNamestring-Local layout or spacing overrides.
native/root propsReact component props-Passed through to the underlying slot element.

Accessibility

  • Keep TestimonialBlock semantic as an article unless the consuming context requires a different element via render.
  • TestimonialBlockStars has a default accessible label; override aria-label when the rating is not five stars.
  • TestimonialBlockAction includes a default accessible name; provide a more specific aria-label when multiple review links appear together.
  • Provide meaningful alt text for informative reviewer or video images. Use empty alt="" only for decorative thumbnails.
  • For video testimonials, use Video Player Dialog with TestimonialBlockPlayButton as its trigger. This provides consistent focus management, controls, fullscreen behavior, and playlist support.

On this page