# react-native-expand

> A expandable component for React Native

Latest version **1.0.6** (published 2017-08-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-expand
pnpm add react-native-expand
yarn add react-native-expand
bun add react-native-expand
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2017-08-18 |
| First published | 2017-03-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 24 |
| Author | Jeremy He |
| Maintainers | hejiaji |

## Links

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

## Recent versions

- 1.0.6 (latest) — 2017-08-18
- 1.0.5 — 2017-06-28
- 1.0.4 — 2017-03-28
- 1.0.3 — 2017-03-21
- 1.0.2 — 2017-03-17
- 1.0.1 — 2017-03-17
- 1.0.0 — 2017-03-17

## README

# react-native-expand

![travis-ci](https://travis-ci.org/hejiaji/react-native-expand.svg?branch=master)


A expandable component for React Native

![image](Example/images/demo.gif)

## Getting started
```bash
npm install react-native-expand --save
```

## Example usage

```javascript
class App extends React.Component {
  constructor(props) {
    super(props);
    this.ds = [BandageIcon,CallIcon,DislikeIcon,
    FistIcon, FlowersIcon, HeartIcon, LikeIcon,
    LikingIcon, PartyIcon, PokeIcon, SuperLikeIcon, VictoryIcon];
  }

  renderRowData(rowData, index) {
    return (
      <View key={index} style={styles.row}>
        <Image style={styles.thumb} source={rowData}/>
        <Text style={styles.text}>Row{index + 1} {LOREM_IPSUM}</Text>
      </View>
    );
  }

  render() {
    return (
      <ExpandablePanel
        contentPanelStyle={styles.container}
        dataSource={this.ds}
        renderRow={this.renderRowData}
      />
    )
  }
}
```

## Properties

| Prop | Description | Default |
|---|---|---|
|**`contentPanelStyle`**|The style for the component container.|None|
|**`footerPanelStyle`**|The style for the footer container.|None|
|**`footerTextStyle`**|The style for the footer text.|None|
|**`dataSource`**|The dataSource for the component to use.| None |
|**`renderRow`**|The function to defined how the item to be showed.|None|
|**`renderHeader`**|The function to render customer header for this component.|None|
|**`minRowCount`**|The minimum count of rows to render when the component is collapsed .|`1`|
|**`expandText `**|The text to indicate expand operation.|`↓ Load More`|
|**`collapseText `**|The text to indicate collapse operation.|`↑ Collapse`|

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