Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gapur/react-native-accordion
Animated accordion component for React Native
https://github.com/gapur/react-native-accordion
accordion collapsible react react-native react-native-accordion
Last synced: about 2 months ago
JSON representation
Animated accordion component for React Native
- Host: GitHub
- URL: https://github.com/gapur/react-native-accordion
- Owner: Gapur
- License: mit
- Created: 2020-09-24T16:56:09.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-26T09:28:52.000Z (almost 2 years ago)
- Last Synced: 2024-09-23T20:18:26.182Z (3 months ago)
- Topics: accordion, collapsible, react, react-native, react-native-accordion
- Language: Java
- Homepage: https://www.npmjs.com/package/@gapur/react-native-accordion
- Size: 1.17 MB
- Stars: 15
- Watchers: 4
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-native-accordion
Animated accordion component for React Native with React 17 and React Native 0.64.3 Support
## Example app
![image](example-app.gif)
## Installation
```bash
npm install --save @gapur/react-native-accordion
```## Usage
```js
import Accordion from "@gapur/react-native-accordion";
{description}
```
You can also show arrow button on the bottom and override accordion header content:
```js
renderAccordionHeader()}>
{title}
{description}
```
## Properties
| Prop | Description | Default |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
| **`headerStyle`** | Optional styling for the header title container | `{}` |
| **`headerTitle`** | Header title text | |
| **`headerTitleStyle`** | Header title text style | |
| **`showButton`** | Show accordion bottom button | `false` |
| **`buttonStyle`** | Accordion bottom button style | `{}` |
| **`renderHeader`** | Render own accordion header | `() => {}` |
| **`style`** | Optional styling for the container | |
| **`renderButtonContent`** | Render own accordion bottom button | `(showContent) => {}` |## Running example app
```sh
git clone [email protected]:Gapur/react-native-accordion.git
cd react-native-accordion/example
yarn
npm run ios
```## Contributors
## License
MIT