Side-by-Side Image
A two-column layout pairing a large supporting image against a real accordion of questions and answers. The image side can flip to the left or right via a single prop, useful for alternating sections on a long page.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its media-slot dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/side-by-side-image.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/faq/faq13.tsx instead.
Usage
The file also exports faq13Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Faq13, faq13Demo } from "@/components/blocks/faq/faq13"; export default function Page() { return <Faq13 {...faq13Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Frequently asked questions" | Section heading. |
| description | string | undefined | Optional supporting copy under the heading. |
| image | MediaSlotImage | none | Large image shown in the image column. |
| imagePosition | "left" | "right" | "left" | Which side the image column renders on. |
| items | Faq13Item[] | none | Ordered list of question and answer entries in the accordion column. |
| className | string | none | Extra classes for the outer section element. |
Types
type Faq13Item = { question: string; answer: string };
Behavior notes
- Real interactivity: the accordion column is a genuine single-open-at-a-time accordion with aria-expanded/aria-controls buttons.
- The image is a decorative MediaSlot at aspect-4/3, it is not clickable or otherwise interactive.
- imagePosition flips which column the image renders in at the lg breakpoint via an order utility; below lg both columns stack with the image first regardless of the prop.
- The first accordion item is open by default on initial render.
More FAQ Blocks
View all →collapsible-accordion
Collapsible Accordion
Stacked cards with expandable sections, for full-length answers in a compact format.
open-list-layout
Open List Layout
Questions with answers displayed directly below in a simple always-open list.
three-column-grid
Three Column Grid
Q&A pairs arranged in a responsive grid layout, always open.
tabbed-categories
Tabbed Categories
Sidebar navigation with category tabs and an accordion of that category's questions.
searchable-accordion
Searchable Accordion
Search input that filters accordion items in real-time by question and answer text.
grouped-sections
Grouped Sections
FAQs organized into titled sections, each with its own independent accordion below it.