FAQ, numbered cards


Install
npx shadcn add https://ui.klarhimmel.com/r/faq-numbered-cards.jsonDetailsAbout, usage, props and more
A left-aligned header over a hairline, then every question and answer open in its own numbered, bordered card, three to a row on wide containers and one on a phone, and…
Import
Import
- faq/numbered-cards
- About
- A left-aligned header over a hairline, then every question and answer open in its own numbered, bordered card, three to a row on wide containers and one on a phone, and an action row under a second hairline.
- Category
- The questions people ask before they buy. New project? Set it up once: /get-started/installation.
Notes
When to use it
A left-aligned header over a hairline, then every question and answer open in its own numbered bordered card, with an action row under a second hairline. Use faq-list for answers that open on click.
Writing for it
- Write each answer as a short paragraph, since all of them are visible at once. - Let the numbers 01, 02 and so on carry the order, and put the most asked question first. - Use the action row for what to do if the answer is not here, and say how soon someone replies.
Watch out for
The cards sit three to a row on wide containers and one on a phone. With all three action labels empty the row and its rule go, which is right when nothing follows.
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 to do if the answer is not…' | Text, up to 300 characters. |
items | { question, answer }[] | 6 items | List of 2 to 9. Each item: question, answer. |
primary | Link | {…} | Optional; empty is not rendered. |
secondary | Link | {…} | Optional; empty is not rendered. |
more | Link | {…} | Optional; empty is not rendered. |
compact | boolean | - | Optional; empty is not rendered. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |