Skip to content

Accordion List

Divided rows that open by height; closed rows dim until hovered.

From the Nitip template — see it in context

Positioning, audience research and a clear voice, so every page speaks to the right people.

Layouts, type and motion designed together, tested at every screen size before a line of code.

Fast, accessible sites built on Next.js, with content your team can edit without a developer.

Installation

$ npx shadcn@latest add https://framebrick.co/r/accordion-list.json

Usage

import { AccordionList } from "@/components/ui/accordion-list";

<AccordionList
  defaultValue={["design"]}
  items={[
    { value: "design", marker: "01", title: "Web design", content: "…" },
    { value: "build", marker: "02", title: "Development", content: "…" },
  ]}
/>

Props

PropTypeDefaultDescription
items{ value, title, content, marker? }[]—Rows. The marker (number, dot, icon) shows from 640 px up.
type"single" | "multiple""single"Single closes the open row when another opens.
valuestring[]—Open rows (controlled).
defaultValuestring[][]Initially open rows (uncontrolled).
onValueChange(value: string[]) => void—Called when rows open or close.
dimbooleantrueClosed rows sit at 50% opacity until hovered.
  • Closed panels stay in the HTML (search engines read them) but are inert, so keyboards and screen readers skip them.

AI prompt

Paste into v0, Lovable, Bolt or Claude to rebuild this component in your own project.

Create a React + Tailwind CSS + Motion (motion/react) component called AccordionList.
- Proportions of the shadcn/ui Accordion: rows with border-b (none on the last), trigger py-4 text-sm font-medium.
- Each row: a full-width button with an optional marker (muted, tabular numbers, hidden under 640px), the title and a
  16px muted plus icon.
  Open: the plus rotates 45° into a cross (spring, no bounce, 0.4s).
- The panel animates height 0 → auto with the same spring; its opacity fades in 0.25s after a 0.1s delay and fades out in 0.15s.
- Closed rows are 50% opacity and return to 100% on hover or keyboard focus (0.4s ease-out).
- Props: items {value,title,content,marker?}[], type single|multiple, value/defaultValue/onValueChange (string[]), dim.
- Accessibility: aria-expanded / aria-controls on the button, role region + aria-labelledby on the panel,
  closed panels stay rendered but inert.

Be the first to know

Get new templates and components first

One short email when we release a template or a free component. No spam — unsubscribe anytime.

We use your email only for Framebrick updates. Privacy policy