Ruixen Pro is now live.50+ premium components, templates, blocks, and lifetime updates.

Command Palette

Search for a command to run...

Docs
Editorial Accordion

Editorial Accordion

A pull-quote-accented accordion with sentence-length titles, hover micro-translation, and opacity-driven hierarchy for editorial layouts.

Installation

Usage

import AccordionEditorial from "@/components/ruixen/accordion-editorial";
 
export default function About() {
  return <AccordionEditorial />;
}

Custom Data

const myItems = [
  {
    id: "mission",
    title: "Our Mission",
    content: "Building tools that empower creators worldwide.",
  },
  {
    id: "vision",
    title: "Our Vision",
    content: "A world where great design is accessible to everyone.",
  },
  {
    id: "values",
    title: "Our Values",
    content: "Simplicity, craft, and relentless attention to detail.",
  },
];
 
<AccordionEditorial items={myItems} defaultValue="mission" />;

Controlled

const [open, setOpen] = useState("clarity");
 
<AccordionEditorial value={open} onValueChange={setOpen} />;

Props

PropTypeDefaultDescription
itemsAccordionEditorialItem[]Built-in sampleArray of accordion items
defaultValuestring"restraint"ID of the item open by default
valuestring-Controlled open item ID
onValueChange(value: string) => void-Callback when the open item changes
collapsiblebooleantrueWhether the open item can be collapsed
classNamestring-Additional CSS classes for container

Item Structure

interface AccordionEditorialItem {
  id: string;
  title: string;
  content: string;
}

Features

  • Pull-quote accent: Left border on expanded content creates an editorial blockquote feel
  • Hover micro-translation: 1px rightward nudge on hover for tactile feedback
  • Border-less layout: Items separated by spacing alone, no visible dividers
  • Spring-timed transitions: cubic-bezier(0.16, 1, 0.3, 1) easing on all state changes
  • Controlled & uncontrolled: Works with both value and defaultValue patterns