Skip to content
Klarhimmel UI

Testimonial, quote

Testimonial, quote previewTestimonial, quote preview

Install

npx shadcn add @klarhimmel/testimonial-quote
DetailsAbout, usage, props and more

One large pull quote with a name, a role, a company and a portrait; a quote alone (a press line) shows without them.

Import

Import

import Block from '@/components/klarhimmel/blocks/testimonial-quote';
Also called
  • testimonials/quote
Category
What customers say, one quote or many. New project? Set it up once: /get-started/installation.

Notes

When to use it

One large centred quote with a round portrait, name, role and company. Use it as a single moment of proof; testimonials-grid fits several voices and testimonials-split a lead voice with supporting ones.

Writing for it

- The quote holds 400 characters and is set at lead size or larger. Cut it to the one sentence that carries a claim. - Name is the only part of the caption used as the block's label, so write the full name, not a first name. - Add a role (80 characters) that tells the reader why the person knows, and a company (60 characters) which is drawn after a slash and left out when empty.

Watch out for

The portrait is drawn in a 64px circle from the photo field. With no src the circle is an empty frame, so either add a real picture or check how the block looks without one before you publish.

Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import TestimonialQuote from '@/components/klarhimmel/blocks/testimonial-quote';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <TestimonialQuote props={{
          "quote": "Quote a customer, in their words, on the result they got, what changed for them and why they would say it again.",
          "name": "Name a person",
          "role": "Their job title",
          "company": "Their company",
          "photo": {
            "src": "/pictures/avatar-3.svg",
            "alt": "A portrait of a person",
            "srcDark": "/pictures/avatar-3-dark.svg"
          }
        }} />
      </BlockSurface>
    </Theme>
  );
}

Props

The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.

PropTypeDefaultDescription
quotestring'Quote a customer, in their words, o…'Text, up to 400 characters.
namestring'Name a person'Text, up to 60 characters.
rolestring'Their job title'Text, up to 80 characters.
companystring'Their company'Text, up to 60 characters.
photoMedia{…}See the type.
titlestring-Text, up to 120 characters. Optional; empty is not rendered.
cardboolean-Optional; empty is not rendered.
actionLink-Optional; empty is not rendered.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.