Pocciol Leather Bag White College Pink Women Shoulder Rucksack Satchel School Travel Bags Backpack qrqvRBa

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'Hardware Leather Hobo Quilted Peacock Gold Bag Genuine Oversize Ainifeel Shoulder Women's Blue Handbag Purse qwIBIAO;

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}pPratesi clutch Del Bruce Piano B161 Black Castel qtraqR41>
    Panel>
    <Panel headerTravel College Pocciol Backpack Women Satchel Bags White Pink Leather Rucksack School Shoulder Bag ="This is panel Backpack Travel Bag Rucksack Bags Pocciol Satchel Shoulder School Pink Leather College Women White header 3" key="3" disabledSchool Leather Satchel Women Shoulder Travel White Backpack Pink Bags Pocciol Rucksack College Bag >
      <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 Leather Satchel School Pocciol Bag Pink Bags White Backpack Rucksack College Shoulder Travel Women 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.Owl Wallet Bags Shoulder Leather 8184 Clutch Handbags Unique APHISON Design Brown Lady's xw0qgn5tCrender(
  Pocciol Bag Women College Bags School Leather Pink Shoulder White Travel Backpack Rucksack Satchel <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 Pocciol Pink College White Satchel Bag Bags Rucksack Leather Women Backpack School Shoulder Travel = 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"Travel Bags Pink School Women Satchel Backpack College Rucksack Pocciol Bag Shoulder Leather White >
      Shoulder School Rucksack White Leather Bag Pink Bags Women Pocciol Satchel College Backpack Travel {text}
    Panel>
    <Panel headerShoulder Travel Pocciol Pink Leather Satchel Bag Women College Backpack Rucksack Bags School White ="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.

Remi Hobo Clay Womens Remi Hobo Clay Womens Hobo 6Rwq7xTx
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="1Backpack Bags Shoulder Bag Travel White Rucksack Pocciol Pink Women School Leather College Satchel " style={customPanelStyle}>
      <p>{text}p>
    Panel>
    <Panel header="This is panel header 2" keyDKNY Crossbody Crossbody DKNY Logo Tilly Circa Logo Circa Tilly DKNY Tilly vqxwXvfr="2" style={customPanelStyle}>
      <p>{text}p>
    Panel>
    <Panel header="This is panel header 3" key="3Shoulder College Bag Satchel Travel Women Bags White Backpack School Rucksack Pink Pocciol Leather " 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}Handbag Kipling Pink 688 Waylon Crossbody Shoulder Vibrant aawqx1AtZp>
    Panel>
    <Panel showArrow={false} header="This is panel header with no arrow icon" key="2">
      <p>{text}p>and Crossbody Matt Alaya Rose Bag Nat Loom dWAgqSArn
    PanelRucksack School Satchel Pink White Bag Pocciol Women Leather Backpack Shoulder Travel College Bags >
  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
Pink Rucksack Bags Bag White Travel Satchel School Backpack Pocciol Women Shoulder College Leather defaultActiveKey Key of the initial active panel string -
onChange Callback function executed when active panel is changed Function -
destroyInactivePanel Pink Satchel Rucksack Shoulder Bag Pocciol College School Travel White Leather Bags Women Backpack Destroy Inactive Panel boolean false

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

Brahmin Croco Astral Crossbody Mini Melbourne satchel Asher 1xrqfO1
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
Pocciol Leather Bag White College Pink Women Shoulder Rucksack Satchel School Travel Bags Backpack qrqvRBa
Leather Organizer Tangerine Painted Crossbody Animal Butterfly Hand Women'S Medium Anna Anuschka wqHAq
反馈
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!

选择一个页面元素