FAQ, question and answer rows


Install
npx shadcn add @klarhimmel/faq-rowsDetailsAbout, usage, props and more
Every answer open, set as a table of rows: the question is a heading on the left, the answer beside it on the right, hairlines between.
Import
Import
- faq/rows
- About
- Every answer open, set as a table of rows: the question is a heading on the left, the answer beside it on the right, hairlines between. Nothing to click, so it prints and scans well; stacks on narrow containers.
- Category
- The questions people ask before they buy. New project? Set it up once: /get-started/installation.
Notes
When to use it
A policy-style table where every answer is open: the question as a heading on the left, the answer beside it. Nothing to click, so it prints and scans well. For lighter, openable cards use faq-centered.
Writing for it
- Questions are headings in a one-third column and hold 120 characters, so phrase them as short noun phrases or plain questions such as 'Do you have parking?'. - Answers get 500 characters and span the wider two-thirds. Put concrete times, prices and conditions there, since the reader sees them without any click. - The default title shows the register: 'The practical details, in plain words'. A title (120) that promises facts fits this layout better than 'FAQ'.
Watch out for
An empty answer is allowed by the schema (only the question is required) and then the right cell is simply blank, leaving a heading with nothing beside it. Check every row after editing.
Pairs well with
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
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.
| Prop | Type | Default | Description |
|---|---|---|---|
eyebrow | string | 'Section name' | Text, up to 60 characters. |
title | string | 'Say what the answers cover' | Text, up to 120 characters. |
description | string | 'Say what you promise and what you a…' | Text, up to 300 characters. |
items | { question, answer }[] | 5 items | List of 2 to 8. Each item: question, answer. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |