<AccordiondefaultExpandedKeys={['personal']}><Disclosureid="personal"><DisclosureTitle>Personal Information</DisclosureTitle><DisclosurePanel>
Personal information form here.
</DisclosurePanel></Disclosure><Disclosureid="billing"><DisclosureTitle>Billing Address</DisclosureTitle><DisclosurePanel>
Billing address form here.
</DisclosurePanel></Disclosure></Accordion>
<AccordiondefaultExpandedKeys={['personal']}><Disclosureid="personal"><DisclosureTitle>Personal Information</DisclosureTitle><DisclosurePanel>
Personal information form here.
</DisclosurePanel></Disclosure><Disclosureid="billing"><DisclosureTitle>Billing Address</DisclosureTitle><DisclosurePanel>
Billing address form here.
</DisclosurePanel></Disclosure></Accordion>
<AccordiondefaultExpandedKeys={['personal']}><Disclosureid="personal"><DisclosureTitle>
Personal
Information
</DisclosureTitle><DisclosurePanel>
Personal
information form
here.
</DisclosurePanel></Disclosure><Disclosureid="billing"><DisclosureTitle>
Billing Address
</DisclosureTitle><DisclosurePanel>
Billing address
form here.
</DisclosurePanel></Disclosure></Accordion>
Accordion accepts multiple Disclosure elements as children. Each disclosure accepts an id prop which is passed to the onExpandedChange handler to identify the expanded disclosure within the accordion. See the Events section for more details about expansion.
Accordion accepts an onExpandedChange prop which is triggered when a disclosure is expanded or collapsed. The example below uses onExpandedChange to programmatically control disclosure expansion.
import{Key}from'@react-types/shared';functionControlledExpansion(){let[expandedKeys,setExpandedKeys]=React.useState<Set<Key>>(newSet(['personal']));return(<><AccordionexpandedKeys={expandedKeys}onExpandedChange={setExpandedKeys}><Disclosureid="personal"><DisclosureTitle>Personal Information</DisclosureTitle><DisclosurePanel>
Personal information form here.
</DisclosurePanel></Disclosure><Disclosureid="billing"><DisclosureTitle>Billing Address</DisclosureTitle><DisclosurePanel>
Billing address form here.
</DisclosurePanel></Disclosure></Accordion><divstyle={{marginTop: '20px'}}>You have expanded: {expandedKeys}</div></>);}
import{Key}from'@react-types/shared';functionControlledExpansion(){let[expandedKeys,setExpandedKeys]=React.useState<Set<Key>>(newSet(['personal']));return(<><AccordionexpandedKeys={expandedKeys}onExpandedChange={setExpandedKeys}><Disclosureid="personal"><DisclosureTitle>
Personal Information
</DisclosureTitle><DisclosurePanel>
Personal information form here.
</DisclosurePanel></Disclosure><Disclosureid="billing"><DisclosureTitle>Billing Address</DisclosureTitle><DisclosurePanel>
Billing address form here.
</DisclosurePanel></Disclosure></Accordion><divstyle={{marginTop: '20px'}}>
You have expanded: {expandedKeys}</div></>);}
import{Key}from'@react-types/shared';functionControlledExpansion(){let[expandedKeys,setExpandedKeys]=React.useState<Set<Key>>(newSet(['personal']));return(<><AccordionexpandedKeys={expandedKeys}onExpandedChange={setExpandedKeys}><Disclosureid="personal"><DisclosureTitle>
Personal
Information
</DisclosureTitle><DisclosurePanel>
Personal
information
form here.
</DisclosurePanel></Disclosure><Disclosureid="billing"><DisclosureTitle>
Billing
Address
</DisclosureTitle><DisclosurePanel>
Billing
address form
here.
</DisclosurePanel></Disclosure></Accordion><divstyle={{marginTop:
'20px'}}>
You have
expanded:{' '}{expandedKeys}</div></>);}
By default, only one disclosure will be expanded at a time. To expand multiple disclosures, apply the allowsMultipleExpanded prop to Accordion.
<AccordionallowsMultipleExpandeddefaultExpandedKeys={['personal','billing']}><Disclosureid="personal"><DisclosureTitle>Personal Information</DisclosureTitle><DisclosurePanel>
Personal information form here.
</DisclosurePanel></Disclosure><Disclosureid="billing"><DisclosureTitle>Billing Address</DisclosureTitle><DisclosurePanel>
Billing address form here.
</DisclosurePanel></Disclosure></Accordion>
<AccordionallowsMultipleExpandeddefaultExpandedKeys={['personal','billing']}><Disclosureid="personal"><DisclosureTitle>Personal Information</DisclosureTitle><DisclosurePanel>
Personal information form here.
</DisclosurePanel></Disclosure><Disclosureid="billing"><DisclosureTitle>Billing Address</DisclosureTitle><DisclosurePanel>
Billing address form here.
</DisclosurePanel></Disclosure></Accordion>
<AccordionallowsMultipleExpandeddefaultExpandedKeys={['personal','billing']}><Disclosureid="personal"><DisclosureTitle>
Personal
Information
</DisclosureTitle><DisclosurePanel>
Personal
information form
here.
</DisclosurePanel></Disclosure><Disclosureid="billing"><DisclosureTitle>
Billing Address
</DisclosureTitle><DisclosurePanel>
Billing address
form here.
</DisclosurePanel></Disclosure></Accordion>
A slot name for the component. Slots allow the component to receive props from a parent component.
An explicit null value indicates that the local props completely override all props received from a parent.
<AccordionisDisabled><Disclosureid="personal"><DisclosureTitle>Personal Information</DisclosureTitle><DisclosurePanel>
Personal information form here.
</DisclosurePanel></Disclosure><Disclosureid="billing"><DisclosureTitle>Billing Address</DisclosureTitle><DisclosurePanel>
Billing address form here.
</DisclosurePanel></Disclosure></Accordion>
<AccordionisDisabled><Disclosureid="personal"><DisclosureTitle>Personal Information</DisclosureTitle><DisclosurePanel>
Personal information form here.
</DisclosurePanel></Disclosure><Disclosureid="billing"><DisclosureTitle>Billing Address</DisclosureTitle><DisclosurePanel>
Billing address form here.
</DisclosurePanel></Disclosure></Accordion>
<AccordionisDisabled><Disclosureid="personal"><DisclosureTitle>
Personal
Information
</DisclosureTitle><DisclosurePanel>
Personal
information form
here.
</DisclosurePanel></Disclosure><Disclosureid="billing"><DisclosureTitle>
Billing Address
</DisclosureTitle><DisclosurePanel>
Billing address
form here.
</DisclosurePanel></Disclosure></Accordion>
<AccordionisQuiet><Disclosureid="personal"><DisclosureTitle>Personal Information</DisclosureTitle><DisclosurePanel>
Personal information form here.
</DisclosurePanel></Disclosure><Disclosureid="billing"><DisclosureTitle>Billing Address</DisclosureTitle><DisclosurePanel>
Billing address form here.
</DisclosurePanel></Disclosure></Accordion>
<AccordionisQuiet><Disclosureid="personal"><DisclosureTitle>Personal Information</DisclosureTitle><DisclosurePanel>
Personal information form here.
</DisclosurePanel></Disclosure><Disclosureid="billing"><DisclosureTitle>Billing Address</DisclosureTitle><DisclosurePanel>
Billing address form here.
</DisclosurePanel></Disclosure></Accordion>
<AccordionisQuiet><Disclosureid="personal"><DisclosureTitle>
Personal
Information
</DisclosureTitle><DisclosurePanel>
Personal
information form
here.
</DisclosurePanel></Disclosure><Disclosureid="billing"><DisclosureTitle>
Billing Address
</DisclosureTitle><DisclosurePanel>
Billing address
form here.
</DisclosurePanel></Disclosure></Accordion>