Skip to content
Klarhimmel UI

Case-study, problem solution

Case-study, problem solution previewCase-study, problem solution preview

Install

npx shadcn add https://ui.klarhimmel.com/r/case-study-problem-solution.json
DetailsAbout, usage, props and more

A centred heading and line, then a framed picture on the left and short titled parts with one button on the right; on a phone the picture sits above the text.

Import

Import

import Block from '@/components/klarhimmel/blocks/case-study-problem-solution';
Also called
  • case-study/problem-solution
Category
One customer story: the problem, the work, the result. New project? Set it up once: /get-started/installation.

Notes

When to use it

A centred heading and line, then a framed picture on the left and short titled parts on the right with one button. Use case-study-story for a longer narrative and case-study-card for a row of customers.

Writing for it

- Write each part as a small heading over a paragraph, such as the problem, the work and the result. - Choose a picture of the outcome in use, since it sits framed beside the text. - Keep the button to one action, such as reading the full story.

Watch out for

On a phone the picture sits above the text, so the parts start below it. A picture with small details loses them at the narrow size.

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 CaseStudyProblemSolution from '@/components/klarhimmel/blocks/case-study-problem-solution';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <CaseStudyProblemSolution props={{
          "title": "Say what the visitor will see in action",
          "description": "Say in one line what changes for the reader once this is in place.",
          "media": {
            "src": "/pictures/photo-optic1.avif",
            "alt": "Silver-framed glasses on a white table"
          },
          "caption": "Add a short note on the picture",
          "parts": [
            {
              "title": "Name the problem",
              "body": "Describe in two sentences the situation the visitor recognises and what it costs them today."
            },
            {
              "title": "Name the solution",
              "body": "Describe in two sentences what changes for the visitor once your service is in place."
            },
            {
              "title": "Name the result",
              "body": "Describe in two sentences the outcome the visitor ends up with and what to do to get it."
            }
          ],
          "cta": {
            "label": "Start here",
            "href": "#start"
          }
        }} />
      </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
titlestring'Say what the visitor will see in ac…'Text, up to 60 characters.
descriptionstring'Say in one line what changes for th…'Text, up to 120 characters.
mediaMedia{…}See the type.
captionstring'Add a short note on the picture'Text, up to 40 characters.
parts{ title, body }[]3 itemsList of 2 to 4. Each item: title, body.
ctaLink{…}See the type.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.