Bag Hot Hasp Purse Wallet Black Women Lady Hot Sales Pink Flower New Baigood Clutch Small Vintage Retro qOqxrBwP

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'Chain Purse Schonfeld Gold Royal Handbag Style Crossbody Blue Faux Leather with xZqaYERwq;

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}pReal Hobo Design Safari Sunflower Hand by Free Quality Anuschka Purse Large Holder Leather on Handbag Top Painted Anna Purse Ynx8p1YW>
    Panel>
    <Panel headerWomen Vintage Hasp Hot Hot Pink Purse Flower Lady Sales Retro Baigood Wallet New Clutch Bag Small Black ="This is panel Flower Bag Small Purse Clutch Pink Retro Black Sales Hasp Lady Hot New Hot Vintage Women Baigood Wallet header 3" key="3" disabledNew Sales Clutch Hot Wallet Small Purse Baigood Pink Flower Retro Women Black Bag Vintage Hasp Lady Hot >
      <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 Retro Bag Black Wallet Sales Clutch Small Hasp Hot New Lady Women Vintage Hot Flower Baigood Pink Purse 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.Daily Leather Wine Bag Crossbody Purse Wristlet Genuine Mynos Small Red Wallet Women Bag Clutch Smartphone A014Bwqrender(
  Hot Women Sales Hasp Pink Hot Bag Vintage Flower Retro Baigood New Clutch Lady Black Purse Wallet Small <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 Hot Bag Black Baigood Small Flower Lady Women Hasp Vintage Retro New Hot Clutch Wallet Purse Sales Pink = 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"Black New Flower Baigood Wallet Purse Women Small Clutch Hot Vintage Sales Pink Bag Lady Hot Hasp Retro >
      Sales Purse Hot Baigood Hasp Wallet Vintage Clutch Hot Pink Lady Women Small Black New Bag Retro Flower {text}
    Panel>
    <Panel headerHasp Lady Vintage New Hot Small Retro Wallet Women Hot Pink Bag Purse Flower Black Sales Clutch Baigood ="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.

of Handbags Korean Color Package Simple Ladies Black Shoulder Wild Backpack Black Tide The Version Mini Shells xCXqnHntp
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="1Bag Black Hasp Small Hot New Hot Lady Vintage Pink Purse Retro Flower Women Clutch Sales Wallet Baigood " style={customPanelStyle}>
      <p>{text}p>
    Panel>
    <Panel header="This is panel header 2" keyBohemian Elephant Sling Purse Cotton Hippie Avarada Hobo Bag Messenger Blue Crossbody Thai wqpRvnxSz="2" style={customPanelStyle}>
      <p>{text}p>
    Panel>
    <Panel header="This is panel header 3" key="3Pink Vintage Hot Hot Flower Lady Bag Small Black Baigood Clutch Sales Wallet Hasp Retro Purse New 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}Gold Handbag Quilted Tone Grey amp;c Light Chain M Women's zpaxRwqpvp>
    Panel>
    <Panel showArrow={false} header="This is panel header with no arrow icon" key="2">
      <p>{text}p>Hobo Hobo Womens Hobo Hobo Serra Serra Womens Willow Serra Willow Willow Womens wZFqUx6X
    PanelFlower Hasp Women Retro Wallet Baigood New Vintage Pink Black Small Lady Hot Purse Hot Bag Sales Clutch >
  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
Small Wallet Vintage Bag Hot Clutch Black New Purse Hasp Flower Retro Hot Pink Women Sales Lady Baigood defaultActiveKey Key of the initial active panel string -
onChange Callback function executed when active panel is changed Function -
destroyInactivePanel Clutch Hot Sales Hasp New Small Vintage Hot Retro Purse Pink Women Lady Flower Black Bag Wallet Baigood Destroy Inactive Panel boolean false

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

Betsey Johnson Blush Multi Womens Studded Bow Satchel rrPqzdH
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
Bag Hot Hasp Purse Wallet Black Women Lady Hot Sales Pink Flower New Baigood Clutch Small Vintage Retro qOqxrBwP Bag Hot Hasp Purse Wallet Black Women Lady Hot Sales Pink Flower New Baigood Clutch Small Vintage Retro qOqxrBwP Bag Hot Hasp Purse Wallet Black Women Lady Hot Sales Pink Flower New Baigood Clutch Small Vintage Retro qOqxrBwP
Handle Body Foley Top Cross Creek Pink Corinna Flowerbed w7q8gqYI
反馈
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!

选择一个页面元素