# Accordion Component

## About

This is a component published as its own package from our component library monorepo: https://github.com/BenefitsDataTrust/ui-components. Setup instructions, as well as higher-level goals and concerns can be found from the main project [README](https://github.com/BenefitsDataTrust/ui-components/blob/develop/README.md).

## Description

Handles display of accordions according to style guide conventions.

- https://zeroheight.com/990ea04ab/p/479721-accordions

## API

| prop      | type   | required | default | explanation  |
|-----------|--------|----------|---------|--------------|
| children | React node | yes | n/a | The components to render inside the accordion |
| className | string | no | n/a | Adds an optional classname to the component |
| variant | enum("h2", "h3", "h5", "h5") | no | "h3" | Changes typography style of the `title` prop |
| isOpen | boolean | no | false | Determines open state of accordion |
| title | string | no | undefined | Optional title for accordion |
| id | string | no | n/a | Adds an optional id to the children wrapper in the component |
