# react-native-expandable-view

> Expandable View for React Native

Latest version **0.1.6** (published 2017-11-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-expandable-view
pnpm add react-native-expandable-view
yarn add react-native-expandable-view
bun add react-native-expandable-view
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2017-11-24 |
| First published | 2017-02-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Philip Mortiboy |
| Maintainers | philip.mortiboy, rafael.fernandez, thestreet |
| Keywords | React, Native, ReactNative, Expandable, View |

## Links

- npm: https://www.npmjs.com/package/react-native-expandable-view
- Repository: https://github.com/TheStreet/react-native-expandable-view
- Homepage: https://github.com/TheStreet/react-native-expandable-view#readme
- Issues: https://github.com/TheStreet/react-native-expandable-view/issues
- npm.io page: https://npm.io/package/react-native-expandable-view

## 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.6 (latest) — 2017-11-24
- 0.1.5 — 2017-11-10
- 0.1.4 — 2017-06-22
- 0.1.3 — 2017-05-03
- 0.1.2 — 2017-04-11
- 0.1.1 — 2017-04-11
- 0.1.0 — 2017-02-21
- 0.0.3 — 2017-02-21
- 0.0.1 — 2017-02-20

## README

# react-native-expandable-view

An expandable view for react native, working both on Android and iOS.

## <a name='install'>Installation</a>
```
npm install react-native-expandable-view --save
```

## <a name='usage'>Usage</a>
```
import ExpandableView from 'react-native-expandable-view';
```

Then wrap the view you wish to be expandable. 

It will automatically become expandable if the height of its content exceeds the given initial maximum height.

```js
<ExpandableView>
    <View>
        <Text>My expandable view</Text>
    </View>
</ExpandableView>
```

Alernatively, you can render content using the header prop.

When providing this prop, all content in the header will be rendered. The content wrapped by the ExpandableView will be hidden, regardless of whether it exceeds the initial maximum height.

```js
<ExpandableView
    header={this.renderHeader()}
>
    <View>
        <Text>My expandable view</Text>
    </View>
</ExpandableView>
```

## Properties

| Prop | Description | Default |
|---|---|---|
|**`intialMaxHeight`**|The maxmium height your content can be before it becomes expandable|500|
|**`text`**|Text for the expand button|'Tap here to expand'|
|**`header`**|When provided, the header component will always be shown and the child components will be hidden until expanded||
|**`buttonStyle`**|Style object that will be applied to the button View||

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