Skip to content
Klarhimmel UI

FAQ, banner and list

FAQ, banner and list previewFAQ, banner and list preview

Install

npx shadcn add @klarhimmel/faq-banner-list
DetailsAbout, usage, props and more

A wide picture band with the label, heading, lead and one action over its lower left, and a narrow ruled list of questions that open to show the answer beneath it.

Import

Import

import Block from '@/components/klarhimmel/blocks/faq-banner-list';
Also called
  • faq/banner-list
About
A wide picture band with the label, heading, lead and one action over its lower left, and a narrow ruled list of questions that open to show the answer beneath it. On a phone the band keeps its shape and the list stays one column.
Category
The questions people ask before they buy. New project? Set it up once: /get-started/installation.

Notes

When to use it

Pick it when the questions need a photographic opening: a full-width picture band carries the label, heading, lead and one action, and a narrow ruled accordion follows. For a plain heading over the list use faq-list; for a picture beside the list use faq-picture-beside.

Writing for it

- Title up to 120 characters, lead up to 240, one action with a label of 40 or fewer. - One to ten questions of 140 characters or fewer, answers up to 600.

Watch out for

The picture is darkened by half, so a pale or busy photo still needs a plain focal area at the lower left where the text sits. Leave the picture empty only while drafting.

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 FaqBannerList from '@/components/klarhimmel/blocks/faq-banner-list';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <FaqBannerList props={{
          "eyebrow": "Section name",
          "title": "Say what the answers cover",
          "description": "Say in one sentence what to do if the answer is not here.",
          "media": {
            "src": "/pictures/photo-brk1.avif",
            "alt": "A breakfast plate of fruit with orange juice"
          },
          "primaryAction": {
            "label": "Main action",
            "href": "#contact"
          },
          "items": [
            {
              "question": "Ask a question customers have",
              "answer": "Answer in one plain sentence."
            },
            {
              "question": "Ask a question a customer would ask before deciding",
              "answer": "Answer in one or two plain sentences, with the key fact first, then what to do next."
            },
            {
              "question": "Ask a question customers have",
              "answer": "Answer in one plain sentence."
            },
            {
              "question": "Ask a question a customer would ask before deciding",
              "answer": "Answer in one or two plain sentences, with the key fact first, then what to do next."
            }
          ]
        }} />
      </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'Section name'Text, up to 60 characters.
titlestring'Say what the answers cover'Text, up to 120 characters.
descriptionstring'Say in one sentence what to do if t…'Text, up to 240 characters.
mediaMedia{…}See the type.
primaryActionLink{…}Optional; empty is not rendered.
items{ question, answer }[]4 itemsList of 1 to 10. Each item: question, answer.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.