Catalog npm
Back to packageRELEASE DETAILS

1.0.2

npm

352-rc-collapse

rc-collapse ui component for react

accordioncollapserc-collapsereactreact-componentreact-rc-collapse
Published7 Feb 2017
Direct dependencies11
Transitive dependenciesNot calculated

README

Current package documentation

rc-collapse


rc-collapse ui component for react

NPM version build status Test coverage npm download

Development

npm install
npm start

Example

http://localhost:8000/examples/

online example: http://react-component.github.io/collapse/

Features

  • support ie8,ie8+,chrome,firefox,safari

Install

rc-collapse

Usage

var Collapse = require('rc-collapse');
var Panel = Collapse.Panel;
var React = require('react');
var ReactDOM = require('react-dom');
var collapse = (
  <Collapse accordion={true}>
    <Panel header="hello">this is panel content</Panel>
    <Panel header="title2">this is panel content2 or other</Panel>
  </Collapse>
);
ReactDOM.render(collapse, container);

API

Collapse

props:

nametypedefaultdescription
activeKeyArray|StringThe first panel keycurrent active Panel key
defaultActiveKeyArray|Stringnulldefault active key
accordionBooleanfalseaccordion mode, default is null, is collapse mode
onChangeFunction(key)noopcalled when collapse Panel is changed

If accordion is null or false, every panel can open. Opening another panel will not close any of the other panels activeKey should be an array, a string will work fine, activeKey will be an array, and the only item is the activeKey string provided.

If accordion is true, only one panel can be open. Opening any one panel will cause the previously opened panel to close. activeKey should be an string, but array is support too, just use the first item.

Collapse.Panel

props

nametypedefaultdescription
headerString or nodeheader content of Panel
showArrowbooleantrueshow arrow beside header
classNameString or objectcustom className to apply
styleobjectcustom style

key

If key is not provided, the panel's index will be used instead.

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

rc-collapse is released under the MIT license.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 11

Native requirements
11 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
classnames
Environment
{
  "local_name": "classnames",
  "alias": false,
  "peer_metadata": null
}
2.xruntime
rc-animate
Environment
{
  "local_name": "rc-animate",
  "alias": false,
  "peer_metadata": null
}
2.xruntime
css-animation
Environment
{
  "local_name": "css-animation",
  "alias": false,
  "peer_metadata": null
}
1.xruntime
expect.js
Environment
{
  "local_name": "expect.js",
  "alias": false,
  "peer_metadata": null
}
0.3.xdevelopment
jquery
Environment
{
  "local_name": "jquery",
  "alias": false,
  "peer_metadata": null
}
1.xdevelopment
pre-commit
Environment
{
  "local_name": "pre-commit",
  "alias": false,
  "peer_metadata": null
}
1.xdevelopment
rc-tools
Environment
{
  "local_name": "rc-tools",
  "alias": false,
  "peer_metadata": null
}
5.xdevelopment
react
Environment
{
  "local_name": "react",
  "alias": false,
  "peer_metadata": null
}
15.xdevelopment
react-dom
Environment
{
  "local_name": "react-dom",
  "alias": false,
  "peer_metadata": null
}
15.xdevelopment
react-addons-test-utils
Environment
{
  "local_name": "react-addons-test-utils",
  "alias": false,
  "peer_metadata": null
}
15.xdevelopment
string.prototype.repeat
Environment
{
  "local_name": "string.prototype.repeat",
  "alias": false,
  "peer_metadata": null
}
^0.2.0development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "fd3c0d28dde00308ba1e8a72916969031d5e6d69",
  "tarball": "https://registry.npmjs.org/352-rc-collapse/-/352-rc-collapse-1.0.2.tgz",
  "integrity": "sha512-RiQ/SU8nJHNFVYaeIrbSMEbjPb2qRbINxmDrQPVH18TmSDsS6cJANLjLsm8H8jLA7Fg0UHSpNGye0gZSIysQ3A==",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEQCIC6/k/CdFn6kUtriPYLCvIQjJ8redYgXxk7PnntIpedIAiBG+ldZJfxU2lLOUmeZr0kKpL5vBubXpWcNQb0CSIQvoQ=="
    }
  ]
}

Repository

PENDING
bmitchell352/collapse

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:26 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:54db4d05ed2474acbec2fc3ba3fb29e774b331344040ea4d6620aa259fe78cfe

Other collected versions

1.0.17 Feb1.0.07 FebView all collected versions →