Skip to content

COMPONENT / classified-accordion

Classified FAQ Accordion_

Framed FAQ accordion with mono question rows, signal ids and +/− marks. One item open at a time by default. Built on Base UI. Requires @cybr/tokens.

Install

  1. 1. Map the @cybr namespace, once per project. Add this inside your components.json, or into its existing "registries" object. No components.json yet? Run npx shadcn@latest init first to create one.

    "registries": { "@cybr": "https://cybr-ui.com/r/{name}.json" }
  2. 2. Add components:

    $ npx shadcn@latest add @cybr/classified-accordion

If shadcn reports Unknown registry "@cybr", step 1 is missing from that project's components.json.

Preview

Run npx shadcn add @cybr/<name>. The source lands in your project, so you own and edit it.

Props

Component props
PropTypeDefaultDescription
defaultValue / valuestring[]—Values of the open items, uncontrolled or controlled. All items start closed by default.
onValueChange(value: string[]) => void—Called when an item opens or closes.
multiplebooleanfalseLet more than one item be open at a time.
...propsAccordion.Root props—Forwarded to Base UI's Accordion.Root; className is merged last with cn().
Item valuestring—Unique value for the item.
Item idReactNode—Signal-coloured tag before the question, such as F-01.
Item questionReactNode—The trigger text.
Item headingAs"h2" | "h3" | "h4""h3"Heading level wrapping the trigger. Match your page outline.
Item childrenReactNode—The answer, shown in the panel.
Item ...propsAccordion.Item props—Forwarded to Base UI's Accordion.Item, such as disabled; className is merged last with cn().

Usage

Installs @base-ui/react. Needs the stylesheet from @cybr/tokens. After the install, import it in app/globals.css:

@import "tailwindcss";
@import "../styles/cybr-tokens.css";
import { ClassifiedAccordion, ClassifiedAccordionItem } from "@/components/ui/classified-accordion";

export function Faq() {
  return (
    <ClassifiedAccordion>
      <ClassifiedAccordionItem value="install" id="F-01" question="HOW DO I INSTALL ONE?">
        Run npx shadcn add @cybr/&lt;name&gt;.
      </ClassifiedAccordionItem>
    </ClassifiedAccordion>
  );
}

States

Accessibility