Skip to content
Klarhimmel UI

FAQ, with a support card

FAQ, with a support card previewFAQ, with a support card preview

Install

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

" card with up to three ways to reach a person and one action. For products where the real answer is often a conversation.

Import

Import

import Block from '@/components/klarhimmel/blocks/faq-support';
Also called
  • faq/support
About
An accordion of questions beside a raised "still stuck?" card with up to three ways to reach a person and one action. For products where the real answer is often a conversation.
Category
The questions people ask before they buy. New project? Set it up once: /get-started/installation.

Notes

When to use it

An accordion with a raised 'still stuck?' card beside it, for products where the real answer is often a conversation. If the questions are the whole point and no contact is needed, use faq-list.

Writing for it

- The support card title is required and holds 60 characters; 'Still stuck?' works because it speaks to someone who just read the list and found nothing. - Each channel has a label (30), a value (80) and an href (300). Give the label the medium and the value the hours or address, as in 'Chat' with 'Weekdays 08:00 to 18:00'. - The card's single cta is a secondary button, so send it to a help centre or booking page and leave the primary weight to the rest of the page.

Watch out for

A channel value is a link only when both href and value are filled; with an href but no value, nothing is drawn for it outside the editor. The card is sticky on wide containers, so a very tall accordion keeps it in view while scrolling.

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 FaqSupport from '@/components/klarhimmel/blocks/faq-support';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <FaqSupport props={{
          "eyebrow": "Section name",
          "title": "Say what the answers cover",
          "description": "",
          "items": [
            {
              "question": "Ask a question customers have",
              "answer": "Answer in one or two plain sentences, with the key fact first, then what to do or where to go next."
            },
            {
              "question": "Ask a question customers have",
              "answer": "Answer in one or two plain sentences, with the key fact first, then what to do or where to go next."
            }
          ],
          "support": {
            "title": "Say who can help",
            "text": "Say who answers and how soon they reply.",
            "channels": [
              {
                "label": "Channel",
                "value": "When it is open",
                "href": "#chat"
              },
              {
                "label": "Channel",
                "value": "Their email address",
                "href": "mailto:help@example.com"
              }
            ],
            "cta": {
              "label": "Link to more help",
              "href": "#help"
            }
          }
        }} />
      </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''Text, up to 300 characters.
items{ question, answer }[]4 itemsList of 2 to 8. Each item: question, answer.
support{ title, text, channels, cta }{…}Fields: title, text, channels, cta.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.