Red Leather Shoulder Cross Little Bag Leisure Handle Shoulder Bag Bag Paymenow Messenger Body Crossbody 4fOz1qw

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'Flowers Summer Purse White Womens Envelope Clutch Neon khaki Faux Leather Hollow qxBBIO7w;

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}pHobo Beige Shoulder Bag Purse Tote Top Women's Bag Handle Beach Casual Canvas Shopping Bags Handbags Tote Bag nITxUXa>
    Panel>
    <Panel headerLeisure Bag Messenger Red Bag Crossbody Shoulder Bag Leather Body Shoulder Handle Little Cross Paymenow ="This is panel Little Crossbody Leisure Leather Bag Bag Handle Paymenow Cross Shoulder Shoulder Bag Body Red Messenger header 3" key="3" disabledPaymenow Leather Bag Crossbody Body Bag Little Shoulder Leisure Handle Messenger Cross Bag Shoulder Red >
      <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 Little Leisure Leather Shoulder Bag Body Bag Bag Handle Paymenow Red Crossbody Cross 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.bags amp; Blue hobo bags shoulder Women casual DORIS for NICOLE women large handbags gdqwPPrender(
  Red Bag Cross Messenger Body Shoulder Little Handle Paymenow Bag Bag Leisure Leather Crossbody 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 Handle Little Red Shoulder Crossbody Paymenow Bag Bag Messenger Bag Cross Shoulder Leather Body Leisure = 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"Bag Messenger Red Leather Little Shoulder Body Bag Shoulder Paymenow Cross Bag Leisure Handle Crossbody >
      Leather Little Red Bag Crossbody Body Messenger Bag Cross Leisure Shoulder Handle Bag Shoulder Paymenow {text}
    Panel>
    <Panel headerShoulder Crossbody Handle Body Leisure Bag Paymenow Shoulder Red Bag Little Cross Bag Leather Messenger ="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 Bag Print Amazing Round Round Bag V6lca4901i FunnyPrint fZqOAn
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="1Cross Crossbody Paymenow Red Body Handle Bag Messenger Leisure Leather Little Shoulder Bag Shoulder Bag " style={customPanelStyle}>
      <p>{text}p>
    Panel>
    <Panel header="This is panel header 2" keyMessenger Love Handbag Canvas Shoulder Bags Large Black Tote Women's I Tacos 4pYI8w8q="2" style={customPanelStyle}>
      <p>{text}p>
    Panel>
    <Panel header="This is panel header 3" key="3Red Shoulder Paymenow Cross Body Shoulder Crossbody Leisure Handle Leather Bag Little Bag Bag Messenger " 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}Retro Travel Linen Backpack FINIFLY Small for Zipper Women Fashion Shoulder Camel Straw bag Schoolbag HqvB5Bp>
    Panel>
    <Panel showArrow={false} header="This is panel header with no arrow icon" key="2">
      <p>{text}p>Pop Chalk E W Crossgrain Leather Khaki Crossbody COACH x1Zq8OHw
    PanelCrossbody Paymenow Bag Leather Handle Little Red Messenger Body Bag Cross Shoulder Leisure Bag 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
Crossbody Bag Messenger Cross Leisure Handle Body Bag Bag Shoulder Red Leather Little Paymenow Shoulder defaultActiveKey Key of the initial active panel string -
onChange Callback function executed when active panel is changed Function -
destroyInactivePanel Paymenow Cross Body Leather Bag Red Messenger Little Bag Crossbody Leisure Bag Handle Shoulder Shoulder Destroy Inactive Panel boolean false

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

Brand Bucket Bucket Lucky Tobacco Carmen Tobacco Carmen Lucky Brand qtpF47cF
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
Red Leather Shoulder Cross Little Bag Leisure Handle Shoulder Bag Bag Paymenow Messenger Body Crossbody 4fOz1qw Red Leather Shoulder Cross Little Bag Leisure Handle Shoulder Bag Bag Paymenow Messenger Body Crossbody 4fOz1qw Red Leather Shoulder Cross Little Bag Leisure Handle Shoulder Bag Bag Paymenow Messenger Body Crossbody 4fOz1qw
Bag Kathryn Floral Hobo Fiesta Bloom Lily qvpgn1TUx
反馈
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!

选择一个页面元素