# react-expandable-context

> React components to make anything expandable

Latest version **0.1.0** (published 2018-11-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-expandable-context
pnpm add react-expandable-context
yarn add react-expandable-context
bun add react-expandable-context
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-11-25 |
| First published | 2018-11-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 200.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Jonathan Borg |
| Maintainers | jonathan-san |
| Keywords | react, expand, expandable, accordion, accordions, context, folding, collapse, collapsable |

## Links

- npm: https://www.npmjs.com/package/react-expandable-context
- Repository: https://github.com/jb-san/react-expandable-context
- Homepage: https://github.com/jb-san/react-expandable-context#readme
- Issues: https://github.com/jb-san/react-expandable-context/issues
- npm.io page: https://npm.io/package/react-expandable-context

## 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

- 0.1.0 (latest) — 2018-11-25

## README

# react-expandable-context

React components to make anything to be expandable

## Installation

`npm i react-expandable-context`

`yarn add react-expandable-context`

## Usage

```jsx
import Expandable from 'react-expandable-context';

function MyComponent(props) {
    return (
        <Expandable>
            <Expandable.Section id={'first'}>
                {({ handleClick, expanded }) => (
                    <>
                        <a id={'link'} onClick={handleClick}>
                            Header
                        </a>
                        <div id={'section-body'} expanded={expanded ? 'true' : 'false'}>
                            lorem
                        </div>)
                    </>
                )}
            </Expandable.Section>
            <Expandable.Section id={'second'}>
                {({ handleClick, expanded }) => (
                    <>
                        <a id={'link'} onClick={handleClick}>
                            Header
                        </a>
                        <div id={'section-body'} expanded={expanded ? 'true' : 'false'}>
                            lorem
                        </div>)
                    </>
                )}
            </Expandable.Section>
        </Expandable>
    );
}
```

## TODO: document props

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