Skip to content

Accordion

Rows whose panels spring open to their measured height.

Download
Customize

The plus turns into a minus, and the open item sits on a soft fill that grows with its panel.

Install

npx shadcn@latest add https://obsydeui.com/r/accordion.json

Usage

Import it from where the CLI puts it, or copy the files below by hand.

import { Accordion } from '@/components/obsyde/ember/accordion/Accordion';

export function Example() {
  return (
    <Accordion type="single" />
  );
}

Files

Plain React, TypeScript and CSS. No dependencies. The download keeps these paths.

  • ember/accordion/Accordion.tsxcomponent
  • ember/accordion/accordion.cssstyles
  • ember/accordion/AccordionDemo.tsxdemo
  • ember/nav-kit/motion.tsshared
  • ember/shared/spring.tsshared
  • ember/shared/accent.tsshared
  • ember/shared/ember.cssshared

API

PropTypeDefault
accentAccent'ember' | 'volt' | 'arc''ember'
countItemsnumber3
typeType'single' | 'multiple''single'
openOpen at firststring'First'