Skip to content
Klarhimmel UI

Testimonials, alternating

Testimonials, alternating previewTestimonials, alternating preview

Install

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

A centred eyebrow and heading, then rows that each pair a quote and a name with a picture, the picture switching sides row by row; on a phone each row stacks as quote…

Import

Import

import Block from '@/components/klarhimmel/blocks/testimonials-alternating';
Also called
  • testimonials/alternating
About
A centred eyebrow and heading, then rows that each pair a quote and a name with a picture, the picture switching sides row by row; on a phone each row stacks as quote, name, picture.
Category
What customers say, one quote or many. New project? Set it up once: /get-started/installation.

Notes

When to use it

A centred eyebrow and heading, then rows that each pair a quote and a name with a picture, the picture switching sides row by row. Use testimonials-grid for many short quotes.

Writing for it

- Use the person's own words for each quote. A short quote is fine because the row keeps its height from the picture. - Put the name first, and the role and company after a comma when the quote is long enough to carry them. - Choose pictures of the person or their work, so each row has its own face.

Watch out for

On a phone each row stacks as quote, name and picture, so the picture lands below the words. Rows of very different quote length look uneven.

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

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <TestimonialsAlternating props={{
          "eyebrow": "Name the section in two or three words",
          "title": "Say in one short line what these quotes show",
          "items": [
            {
              "quote": "Quote the speaker in one or two sentences on what changed for them.",
              "name": "Name a person, their role and company",
              "media": {
                "src": "/pictures/photo-key2.avif",
                "alt": "A key in the lock of a green door"
              }
            },
            {
              "quote": "Quote the speaker in one short sentence.",
              "name": "Name a person",
              "media": {
                "src": "/pictures/photo-lily1.avif",
                "alt": "A white lily in soft light"
              }
            },
            {
              "quote": "Quote the speaker in one or two sentences on what changed for them.",
              "name": "Name a person, their role and company",
              "media": {
                "src": "/pictures/photo-optic1.avif",
                "alt": "Silver-framed glasses on a white table"
              }
            }
          ]
        }} />
      </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 section in two or three wo…'Text, up to 40 characters.
titlestring'Say in one short line what these qu…'Text, up to 100 characters.
items{ quote, name, media }[]3 itemsList of 1 to 6. Each item: quote, name, media.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.