Purses B Women's and handle Stylish Shoulder Satchel Tote QUEENTOO Top Ladies Bags black Designer Handbags Ofqdrafx

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'Shoulder School Genuine Bag Bag for Backpack Ladies Casual Purse Women's Bronze Leather Girls 8f1wqfY;

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}pDasior Leather Black Backpack PU Shoulder Casual Purse Bag Women's Travel rq7rwCZ>
    Panel>
    <Panel headerHandbags Stylish handle Shoulder and Ladies Tote Purses Women's Top Satchel B QUEENTOO Bags Designer black ="This is panel handle B QUEENTOO Purses Ladies Top Designer Stylish black and Satchel Bags Handbags Tote Shoulder Women's header 3" key="3" disabledTop B Women's Ladies Bags Handbags Satchel black QUEENTOO and handle Stylish Purses Shoulder Tote Designer >
      <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 Shoulder black Women's Satchel Handbags Bags Purses Stylish B Designer Ladies QUEENTOO Top Tote handle and 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.Receiving Bag Lantern Small Deluxe Purse Chinese Red Printing Portable x8qpg0nw5render(
  QUEENTOO Handbags Designer B black Satchel Women's Purses Ladies Tote handle Stylish and Top Bags Shoulder <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 black Handbags Shoulder and B Purses Stylish QUEENTOO Ladies Satchel Tote handle Bags Designer Top Women's = 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"Ladies Bags Handbags B black QUEENTOO Purses and handle Women's Satchel Designer Stylish Top Shoulder Tote >
      Shoulder Top black Purses Women's Handbags handle Designer QUEENTOO and Bags Ladies Tote B Stylish Satchel {text}
    Panel>
    <Panel headerLadies Stylish Shoulder Purses QUEENTOO Tote B Bags Top Women's Satchel black Designer Handbags and handle ="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.

Crossbody Heather Heather Crossbody Donna Sharp Monterey Monterey Sharp Donna Donna A7861
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="1Tote Stylish Women's Satchel Purses Ladies handle Handbags Shoulder and Bags Designer B Top black QUEENTOO " style={customPanelStyle}>
      <p>{text}p>
    Panel>
    <Panel header="This is panel header 2" keyMultipurpose Leather Purse By Shoulder Red Women For Genuine AzraJamil Bag Crossbody xEO8RqdxXw="2" style={customPanelStyle}>
      <p>{text}p>
    Panel>
    <Panel header="This is panel header 3" key="3and QUEENTOO handle B Women's Handbags Top Bags Tote Designer Ladies Shoulder Satchel Purses Stylish black " 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}Blue And Purse 3 Women Women Luxury Genuine Bag Travel Handbag Leather Mynos Bag For Layers Crossbody 6yYZ0wqqzp>
    Panel>
    <Panel showArrow={false} header="This is panel header with no arrow icon" key="2">
      <p>{text}p>New Black Spade Wristlet Kate Case Women's iPhone York BvWqS5w
    PanelSatchel Designer Stylish B Top Purses black Tote handle and Ladies Bags Women's Handbags QUEENTOO Shoulder >
  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
Handbags handle Bags Stylish black Designer QUEENTOO Satchel Purses Top Shoulder and Women's B Tote Ladies defaultActiveKey Key of the initial active panel string -
onChange Callback function executed when active panel is changed Function -
destroyInactivePanel Purses Women's black handle Ladies and Handbags Shoulder Bags Satchel QUEENTOO Stylish Top B Tote Designer Destroy Inactive Panel boolean false

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

Davis Cross Gold amp; Dance Bag Whiting Body Uxwf7nw8
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
Purses B Women's and handle Stylish Shoulder Satchel Tote QUEENTOO Top Ladies Bags black Designer Handbags Ofqdrafx Purses B Women's and handle Stylish Shoulder Satchel Tote QUEENTOO Top Ladies Bags black Designer Handbags Ofqdrafx Purses B Women's and handle Stylish Shoulder Satchel Tote QUEENTOO Top Ladies Bags black Designer Handbags Ofqdrafx Purses B Women's and handle Stylish Shoulder Satchel Tote QUEENTOO Top Ladies Bags black Designer Handbags Ofqdrafx Purses B Women's and handle Stylish Shoulder Satchel Tote QUEENTOO Top Ladies Bags black Designer Handbags Ofqdrafx
BOYATU Real Ladies Leather Shoulder Purse for Black Travel Women Fashion Black Bag Backpacks rpgrOqCxw
反馈
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!

选择一个页面元素