# rc-collapse
**Repository Path**: mirrors_fis-components/rc-collapse
## Basic Information
- **Project Name**: rc-collapse
- **Description**: Fork from git+ssh://git@github.com/react-component/rc-collapse.git
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-08-08
- **Last Updated**: 2026-08-01
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# rc-collapse
---
rc-collapse ui component for react
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![npm download][download-image]][download-url]
[](https://saucelabs.com/u/rc-collapse)
[](https://saucelabs.com/u/rc-collapse)
[npm-image]: http://img.shields.io/npm/v/rc-collapse.svg?style=flat-square
[npm-url]: http://npmjs.org/package/rc-collapse
[travis-image]: https://img.shields.io/travis/react-component/collapse.svg?style=flat-square
[travis-url]: https://travis-ci.org/react-component/collapse
[coveralls-image]: https://img.shields.io/coveralls/react-component/collapse.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/react-component/collapse?branch=master
[download-image]: https://img.shields.io/npm/dm/rc-collapse.svg?style=flat-square
[download-url]: https://npmjs.org/package/rc-collapse
## Development
```
npm install
npm start
```
## Example
http://localhost:8000/examples/
online example: http://react-component.github.io/collapse/
## Feature
* support ie8,ie8+,chrome,firefox,safari
## install
[](https://npmjs.org/package/rc-collapse)
## Usage
```js
var Collapse = require('rc-collapse');
var Panel = Collapse.Panel;
var React = require('react');
var ReactDOM = require('react-dom');
var collapse = (
this is panel content
this is panel content2 or other
);
ReactDOM.render(collapse, container);
```
## API
### Collapse
#### props:
| name |
type |
default |
description |
| activeKey |
Array|String |
The first panel key |
current active Panel key |
| defaultActiveKey |
Array|String |
null |
default active key |
| accordion |
Boolean |
false |
accordion mode, default is null, is collapse mode |
| onChange |
Function(key) |
noop |
called when collapse Panel is changed |
If accordion is null or false, every panel open, will not close other panel.
`activekey` should be an array. string will work fine, activekey will be an
array, and the only item is the activeKey string provided;
If accordion is true, only on panel can be active.
`activekey` should be an string, but array is support too, just use the first
item.
### Collapse.Panel
#### props
| name |
type |
default |
description |
| header |
String or node |
|
header content of Panel |
#### key
If no key provide, key value will be the panel index.
## Test Case
http://localhost:8000/tests/runner.html?coverage
## Coverage
http://localhost:8000/node_modules/rc-server/node_modules/node-jscover/lib/front-end/jscoverage.html?w=http://localhost:8000/tests/runner.html?coverage
## License
rc-collapse is released under the MIT license.