Skip to content
Klarhimmel UI

Testimonials, side

Testimonials, side previewTestimonials, side preview

Install

npx shadcn add https://ui.klarhimmel.com/r/testimonials-side.json
DetailsAbout, usage, props and more

An eyebrow, heading, lead and two actions in a left column, with quote cards stacked in the right column, each with a star rating line, the quote and a round face with…

Import

Import

import Block from '@/components/klarhimmel/blocks/testimonials-side';
Also called
  • testimonials/side
About
An eyebrow, heading, lead and two actions in a left column, with quote cards stacked in the right column, each with a star rating line, the quote and a round face with name and role. On a phone the cards follow the text in one column.
Category
What customers say, one quote or many. New project? Set it up once: /get-started/installation.

Notes

When to use it

An eyebrow, heading, lead and two actions in a left column, with quote cards stacked in the right column, each with a star line, the quote and a round face with name and role. Use testimonials-list for a quieter look.

Writing for it

- Set the stars as a whole number and write the rating in words beside them, as the person gave it. - Use the lead to say who is speaking and what they have in common before the quotes. - Pick a small, clear face for every card, since it is drawn as a round picture.

Watch out for

The cards follow the text in one column on a phone, so a tall stack pushes the next section far down. Invented ratings damage trust, so use only real ones.

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 TestimonialsSide from '@/components/klarhimmel/blocks/testimonials-side';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <TestimonialsSide props={{
          "eyebrow": "Name the topic in two or three words",
          "title": "Say what the people quoted have in common",
          "description": "Say in one or two sentences who is speaking and what they have in common, before the quotes.",
          "primary": {
            "label": "Main action",
            "href": "#start"
          },
          "secondary": {
            "label": "Second action",
            "href": "#more"
          },
          "items": [
            {
              "stars": "5",
              "rating": "Rating in words",
              "quote": "Quote the speaker at length on what changed for them.",
              "media": {
                "src": "/pictures/avatar-1.svg",
                "alt": "A portrait of a person",
                "srcDark": "/pictures/avatar-1-dark.svg"
              },
              "author": "Name and role of the speaker"
            },
            {
              "stars": "5",
              "rating": "Rating in words",
              "quote": "Quote the speaker in one line.",
              "media": {
                "src": "/pictures/avatar-2.svg",
                "alt": "A portrait of a person",
                "srcDark": "/pictures/avatar-2-dark.svg"
              },
              "author": "Name and role of the speaker"
            }
          ]
        }} />
      </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
eyebrowstring'Name the topic in two or three words'Text, up to 60 characters.
titlestring'Say what the people quoted have in …'Text, up to 120 characters.
descriptionstring'Say in one or two sentences who is …'Text, up to 240 characters.
primaryLink{…}See the type.
secondaryLink{…}Optional; empty is not rendered.
items{ stars, rating, quote, media, author }[]3 itemsList of 1 to 4. Each item: stars ('1' | '2' | '3' | '4' | '5'), rating, quote, media, author.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.