{"repo":"react-component/collapse","free":true,"listed":false,"github":"https://github.com/react-component/collapse","clone":"git clone https://github.com/react-component/collapse.git","description":"🪗 A flexible collapse and accordion component for React.","language":"TypeScript","stars":332,"topics":["ant-design","antd","javascript","react","react-component"],"license":"MIT","category":"ui-components","readme_excerpt":"@rc-component/collapse Part of the Ant Design ecosystem. 🪗 A flexible collapse and accordion component for React. English 简体中文 Highlights - Supports accordion and multi-panel collapse modes. - Prefer the items API for declarative panel configuration. - Keeps Collapse.Panel for compatibility. It is deprecated and will be removed in v4. - Supports custom expand icons, semantic class names, semantic styles, and motion. Install Usage Examples Run the local dumi site: Then open http://localhost:8000 . API Collapse Property Description Type Default --- --- --- --- accordion Only one panel can be opened at a time boolean false activeKey Current active panel key React.Key \\ React.Key[] - className Additional class name string - classNames Semantic class names Partial - collapsible Specify whether panel trigger area is collapsible header \\ icon \\ disabled - defaultActiveKey Initial active panel key React.Key \\ React.Key[] - destroyOnHidden Destroy inactive panel content boolean false expandIcon Custom expand icon (props: object) = React.ReactNode - items Collapse items content ItemType[] - openMotion Custom open motion CSSMotionProps - prefixCls Component class name prefix string rc-collapse style Inline style object - styles Semantic styles Partial - onChange Callback when active panels change (key: React.Key[]) = void - ItemType Property Description Type Default --- --- --- --- key Panel key React.Key - label Panel header content React.ReactNode - ref Panel DOM ref React.RefObject ","default_branch":null,"files":null,"tree":[],"storefront":"/r/react-component","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/react-component/collapse/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}