Accordion

Documentation and examples for the Accordion component.

Preview

Hello! Content inside accordion

Properties

PropTypeDefaultDescription
titlestring-The visible header of the item.
childrenReactNode-The content hidden inside.

Usage

Follow these steps to add and use Accordion.

1

Create next app (skip if you already have setup a next app)

terminal
npx create-next-app@latest --yes
2

Install

terminal
npx modui-uikit@latest add accordion
3

Implement

typescript
import { Accordion } from '@/components/ui/accordion'

export default function Example() {
  return (
    <Accordion title="Title for accordion?">
      Yeah the content you can write inside here
    </Accordion>
  )
}