# responsive-react-accordion

> ## Installation

Latest version **1.1.5** (published 2022-10-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install responsive-react-accordion
pnpm add responsive-react-accordion
yarn add responsive-react-accordion
bun add responsive-react-accordion
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.5 |
| Published | 2022-10-28 |
| First published | 2021-12-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=12 |
| Dependencies | 1 |
| Unpacked size | 32.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Gaurav konde |
| Maintainers | gauravk2610 |
| Keywords | accordion, react, typescript, react-accordion, responsive, responsive-accordion, responsive-react-accordion, react-responsive accordion, awesome-accordion, collapsiable, react-collapsiable |

## Links

- npm: https://www.npmjs.com/package/responsive-react-accordion
- Repository: https://github.com/Gauravk2610/responsive-react-accordion
- Issues: https://github.com/Gauravk2610/responsive-react-accordion/issues
- npm.io page: https://npm.io/package/responsive-react-accordion

## Dependencies (1)

- [styled-components](https://npm.io/package/styled-components.md) ^5.3.3

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.5 (latest) — 2022-10-28
- 1.1.4 — 2022-10-28
- 1.1.3 — 2022-10-28
- 1.1.2 — 2021-12-13
- 1.1.1 — 2021-12-13
- 1.0.1 — 2021-12-13

## README

# Responsive React Accordion

## Installation

```bash
# npm install
npm i responsive-react-accordion
# yarn install
yarn add responsive-react-accordion
```

## Demo
![2021-12-14_02-33-40_AdobeCreativeCloudExpress_AdobeCreativeCloudExpress](https://user-images.githubusercontent.com/63660013/145889030-93ea283f-81e3-4883-bfdc-52ad33d22897.gif)


## Usage


```js
// import the npm package
import { Accordion } from 'responsive-react-accordion';
```

## Simple example

```js
// Simple example
<Accordion 
  title='This is an awesome react accordion' 
  content='This is hell awesome 🔥' 
/>
```

### Render prop example

```js
// Props example
<Accordion 
  title='This is an awesome react accordion' 
  content='This is hell awesome 🔥' 
  openIcon={Opening Icon}
  closeIcon={Closing Icon}
  spacing={10} 
/>
```


## Props

| Prop                   | Type             | Description                                                                                                                                                                                                                                                          |
| ---------------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| title                  | String     | The title of the accordion.
| content                | String     | The content inside the accordion. 
| spacing                | Number     | The spacing between the accordion. 
| openIcon               | any        | The customizable opening icon. 
| closeIcon              | any        | The customizable closing icon. 

## Complete example

```js
import { Avatar } from 'user-profile-avatar'

function App() {
  return (
    <div className="App">
      <Avatar 
        src='Enter your image Link'
        alt='profile'
        size={80}
      />
    </div>
  );
}

export default App;

```

## CSS Styling access to containers
```css
/* .accordion-container is the parent container */
.accordion-container {
  /* enter your css */
}

/* .accordion this is a extra wrapper for the main component */
.accordion {
  /* here you can add a univeral bg color and style the remainig component according */
  /* example */
  background-color: #0d152d;
  border: 2px solid white;
  border-radius: 12px;
  color: white;
}

/* .accordion-title this is where the title of accordion is kept */
.accordion-title {
  /* style the title of the accordion  */
  /* example */
  font-size: 20px;
  font-weight: 600;
}

/* .accordion-collapsible the collapsible content */
.accordion-collapsible {
  /* style the content of the accordion */
  /* example */
  background-color: white;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  color: black;
}

/* .accordion-icon  the icons in the .accordion-title element */
.accordion-icon  {
  /* to set the size of the icon */
  /* example */
  width: 20px;
}
```

---
_Source: https://npm.io/package/responsive-react-accordion · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
