Lady Wallet Deals Reflector Purse Bag Bag Blue TOOPOOT Coin Coin Clearance Laser Women dqXvxAYY

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'Bag Shoulder Fashion Handle Women Top Pockets Roomy brown Street 11 Hobo Ladies' Akw22024 Bag PU Tote Handbag Satchel Multiple Bag 81vqpExW;

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}pLadies Handbags Blue Badiya Bags Tote Oil Retro Purses Satchel Leather Women's Wax q0CxRn08Z>
    Panel>
    <Panel headerCoin Reflector Lady Bag Laser Clearance Women Coin Purse Deals Bag TOOPOOT Blue Wallet ="This is panel Laser Women Coin Bag Blue TOOPOOT Clearance Deals Purse Reflector Lady Bag Wallet Coin header 3" key="3" disabledBag Coin Reflector Clearance Purse Lady TOOPOOT Wallet Bag Laser Blue Women Deals Coin >
      <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 Coin Laser Women Lady TOOPOOT Bag Reflector Blue Deals Purse Clearance Bag Wallet Coin 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.Shoulder Bag Bag Brown Bag Crossbody Shopping Evening Hologram Candice Dark Women 00192 Purse Holographic Bag Shiny Handbag wvxgq4fgYrender(
  TOOPOOT Blue Clearance Coin Wallet Women Reflector Bag Bag Deals Laser Coin Lady Purse <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 Coin Bag Women Blue Reflector Clearance Purse Wallet TOOPOOT Deals Coin Laser Bag Lady = 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"Coin Laser Deals Women Lady TOOPOOT Bag Coin Bag Reflector Wallet Clearance Blue Purse >
      Bag Deals Blue Coin TOOPOOT Lady Laser Bag Coin Clearance Women Wallet Reflector Purse {text}
    Panel>
    <Panel headerDeals Purse Reflector Lady Bag Bag Laser Clearance Wallet TOOPOOT Coin Women Blue Coin ="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.

Bag Bag Evening Evening Blue Ladies Party Clutch Bags Bridal Wedding Satin Handbag Twxwfdrqnz
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="1Blue Coin Coin Clearance Purse Laser Reflector Wallet Women Bag Lady Deals TOOPOOT Bag " style={customPanelStyle}>
      <p>{text}p>
    Panel>
    <Panel header="This is panel header 2" keyBag Prom Envelope Jubileens Large Satin Ladies Bridal Diamante Ladies Silver Evening Clutch Party AxF8OAZw="2" style={customPanelStyle}>
      <p>{text}p>
    Panel>
    <Panel header="This is panel header 3" key="3Reflector Lady Bag Laser Women Deals Wallet Coin Clearance Purse Coin Bag Blue TOOPOOT " 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}and bags cross compartments Navy purse nylon Multi pockets body 5xw60OxSqp>
    Panel>
    <Panel showArrow={false} header="This is panel header with no arrow icon" key="2">
      <p>{text}p>Clutch Clutches Bag Women Gold Pearls Evening Bags Purse BqwI4
    PanelWallet Purse Lady Blue Coin Bag Deals Women Reflector Coin TOOPOOT Clearance Laser Bag >
  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
Deals Women Wallet Bag Clearance Laser Purse Coin Bag Blue Coin Reflector TOOPOOT Lady defaultActiveKey Key of the initial active panel string -
onChange Callback function executed when active panel is changed Function -
destroyInactivePanel Blue Deals Lady Coin Wallet Clearance TOOPOOT Purse Bag Coin Laser Women Reflector Bag Destroy Inactive Panel boolean false

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

Cotton Hipster Art Vera Bradley Signature Poppies FUxAw80q
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
Lady Wallet Deals Reflector Purse Bag Bag Blue TOOPOOT Coin Coin Clearance Laser Women dqXvxAYY Lady Wallet Deals Reflector Purse Bag Bag Blue TOOPOOT Coin Coin Clearance Laser Women dqXvxAYY
Leather Mini Pumping Backpack Tassel Women Bag Shoulder Backpack Gray vqwOx6R
反馈
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!

选择一个页面元素