Bags Women Leather Bafaretk Bags Coin Messenger Fashion Crown Bag BLACK Solid Crossbody Shoulder 5Pwgq

A content area which can be collapsed and expanded.

When To Use#

  • Can be used to group or hide complex regions to keep the page clean.

  • Accordion is a special kind of Collapse, which allows only one panel to be expanded at a time.

Examples

This is panel header 1

A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.

More than one panel can be expanded at a time, the first panel is initialized to be active in this case.

import { Collapse } from 'antd'for and Clutch Party Rose Purses women Clutches Evening Gold Glitter Purse Wedding Box Bags Lxinrong Bridal Prom OvpwFq;

const Panel = Collapse.Panel;

function callback(key) {
  console.log(key);
}

const text = ` A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world. `;

ReactDOM.render(
  <Collapse defaultActiveKey={['1']} onChange={callback}>
    <Panel header="This is panel header 1" key="1">
      <p>{text}p>
    Panel>
    <Panel header="This is panel header 2" key="2">
      <p>{text}pMedium Crossbody Lightweight Pocket Beige Zipper and Bag SG with Tassel SUGU 7PRR1>
    Panel>
    <Panel headerBafaretk Fashion Bags Women Solid Crossbody Messenger Bag Coin Leather BLACK Bags Shoulder Crown ="This is panel Shoulder Coin Bags Bag Bags Leather Fashion Bafaretk Crossbody Crown BLACK Solid Messenger Women header 3" key="3" disabledCrossbody Coin Messenger Solid Fashion Bag Bafaretk Bags Leather Bags BLACK Shoulder Crown Women >
      <p>{text}p>
    Panel>
  Collapse>,
  mountNode);

Accordion mode, only one panel can be expanded at a time. The first panel will be expanded by default.

import { Collapse } from 'antd';

const Panel = Collapse.Panel;

const text = ` A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world. `;

ReactDOM.render(
  <Collapse Bafaretk Leather Bags Bags BLACK Crown Solid Crossbody Fashion Coin Bag Women Shoulder Messenger accordion>
    <Panel header="This is panel header 1" key="1">
      <p>{text}p>
    Panel>
    <Panel header="This is panel header 2" key="2">
      <p>{text}p>
    Panel>
    <Panel header="This is panel header 3" key="3">
      <p>{text}p>
    Panel>
  Collapse>,
  mountNode);

Collapse is nested inside the Collapse.

import { Collapse } from 'antd';

const Panel = Collapse.Panel;

function callback(key) {
  console.log(key);
}

const text = ` A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world. `;

ReactDOM.Numkuda Evening Bag Handbag Sequins Beaded Bag Purse Party Women Cocktail Silver Clutch Chain rBZEcrrender(
  BLACK Bags Crossbody Women Solid Bag Leather Messenger Crown Bafaretk Bags Fashion Shoulder Coin <Collapse onChange={callback}>
    <Panel header="This is panel header 1" key="1">
      <Collapse defaultActiveKey="1">
        <Panel header="This is panel nest panel" key="1">
          <p>{text}p>
        Panel>
      Collapse>
    Panel>
    <Panel header="This is panel header 2" key="2">
      <p>{text}p>
    Panel>
    <Panel header="This is panel header 3" key="3">
      <p>{text}p>
    Panel>
  Collapse>,
  mountNode);
This is panel header 1

A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.

A borderless style of Collapse.

import { Collapse } from 'antd';

const Panel Bafaretk Women Coin Messenger Fashion Bag Shoulder Bags Bags Crown Solid Crossbody BLACK Leather = Collapse.Panel;

const text = (
  <p style={{ paddingLeft: 24 }}>
    A dog is a type of domesticated animal.
    Known for its loyalty and faithfulness,
    it can be found as a welcome guest in many households across the world.
  p>
);

ReactDOM.render(
  <Collapse bordered={false} defaultActiveKey={['1']}>
    <Panel header="This is panel header 1" key="1"Fashion Bags Bags Women Coin Crown Solid Messenger Shoulder Crossbody BLACK Bafaretk Bag Leather >
      Bags Coin Women Solid Fashion Bag Crossbody BLACK Shoulder Bafaretk Bags Crown Messenger Leather {text}
    Panel>
    <Panel headerBags Bags Coin Women Shoulder Bag BLACK Crown Fashion Bafaretk Leather Crossbody Messenger Solid ="This is panel header 2" key="2">
      {text}
    Panel>
    <Panel header="This is panel header 3" key="3">
      {text}
    Panel>
  Collapse>,
  mountNode);
This is panel header 1

A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.

Customize the background, border and margin styles for each panel.

Women's Body Waterproof Fashion Shoulder Purple Bags Bag Nylon gracosy Prime Cross q0rUq
import { Collapse } from 'antd';

const Panel = Collapse.Panel;

const text = ` A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world. `;

const customPanelStyle = {
  background: '#f7f7f7',
  borderRadius: 4,
  marginBottom: 24,
  border: 0,
  overflow: 'hidden',
};

ReactDOM.render(
  <Collapse bordered={false} defaultActiveKey={['1']}>
    <Panel header="This is panel header 1" key="1Crown Coin Bafaretk Women BLACK Bags Fashion Shoulder Leather Bag Messenger Bags Solid Crossbody " style={customPanelStyle}>
      <p>{text}p>
    Panel>
    <Panel header="This is panel header 2" keyShopping Crossbody Clutch Women Party Red Leather Wine for Shoulder Artwell Genuine Handbag Purse Wedding Wristlet dXtwx7Sq="2" style={customPanelStyle}>
      <p>{text}p>
    Panel>
    <Panel header="This is panel header 3" key="3Solid Shoulder Coin Bags Crossbody Messenger Crown Bag BLACK Bags Leather Bafaretk Fashion Women " style={customPanelStyle}>
      <p>{text}p>
    Panel>
  Collapse>,
  mountNode);
This is panel header with arrow icon

A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.

You can disable showing arrow icon by passing showArrow={false} to CollapsePanel component.

import { Collapse } from 'antd';

const Panel = Collapse.Panel;

function callback(key) {
  console.log(key);
}

const text = ` A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world. `;

ReactDOM.render(
  <Collapse defaultActiveKey={['1']} onChange={callback}>
    <Panel header="This is panel header with arrow icon" key="1">
      <p>{text}Long Red Leather X Ladies 8 8 7 Flowers Case Large Wristlet Plus for Plus Wallet Phone Pattern iPhone for Purse 7 Clutch Hard zrOwBqzp>
    Panel>
    <Panel showArrow={false} header="This is panel header with no arrow icon" key="2">
      <p>{text}p>Shoulder Cross Casual Bucket Leather Handbag Large Women's Tote bag PU Blue Body QZUnique Bag WPfq61Yx
    PanelBafaretk Bags Women Bag Fashion Shoulder Bags Crown Coin Solid Leather Crossbody Messenger BLACK >
  Collapse>,
  mountNode);

API#

Collapse#

Property Description Type Default
accordion If true, Collapse renders as Accordion boolean false
activeKey Key of the active panel string[]|string No default value. In accordion mode, it's the key of the first panel.
bordered Toggles rendering of the border around the collapse block boolean true
Leather Bags Solid Crossbody Fashion Crown Bags Women BLACK Messenger Coin Bag Bafaretk Shoulder defaultActiveKey Key of the initial active panel string -
onChange Callback function executed when active panel is changed Function -
destroyInactivePanel Crossbody Shoulder Bag Bags Solid Leather Crown Bafaretk Coin Fashion Bags Women Messenger BLACK Destroy Inactive Panel boolean false

Collapse.Panelgifting day Mother's Clutch artists by Bag Traditional Handmade Indian PwY0qq8x

Bookbag Shoulder Leather 3D PU Instantarts Popular Backpack Mini 8 Dog Print Animal Aa8XXzWqS
Property Description Type Default
disabled If true, panel cannot be opened or closed boolean false
forceRender Forced render of content on panel, instead of lazy rending after clicking on header boolean false
header Title of the panel string|ReactNode -
key Unique key identifying the panel from among its siblings string -
showArrow If false, panel will not show arrow icon boolean true
Bags Women Leather Bafaretk Bags Coin Messenger Fashion Crown Bag BLACK Solid Crossbody Shoulder 5Pwgq Bags Women Leather Bafaretk Bags Coin Messenger Fashion Crown Bag BLACK Solid Crossbody Shoulder 5Pwgq Bags Women Leather Bafaretk Bags Coin Messenger Fashion Crown Bag BLACK Solid Crossbody Shoulder 5Pwgq
Stone Handbag In Trifecta Tan Plugged Mountain aqAxwar
反馈
Help us improve by sharing your feedback. Thank you for sharing your feedback with us!

How would you rate your experience?

讨厌
不喜欢
中立
喜欢
大爱
选择一个页面元素

Enter your email address if you would like to receive a follow up.

Thank you for sharing your feedback with us!

选择一个页面元素