packages/web-components/src/accordion/README.md
As defined by the W3C:
An accordion is a vertically stacked set of interactive headings that each contain a title, content snippet, or thumbnail representing a section of content. The headings function as controls that enable users to reveal or hide their associated sections of content. Accordions are commonly used to reduce the need to scroll when presenting multiple sections of content on a single page.
Link to Accordion Design Spec in Figma
Fluent WC3 Accordion extends from the FAST Accordion and is intended to be as close to the Fluent UI React 9 Accordion implementation as possible. However, due to the nature of web components there will not be 100% parity between the two.
AccordionAccordion
| Name | Description | Type |
|---|---|---|
AccordionExpandMode | Expand mode for Accordion | { single: "single", multi: "multi" } |
| Name | Privacy | Type | Default | Description |
|---|---|---|---|---|
expandmode | public | AccordionExpandMode | multiple | Controls the expand mode of the Accordion, either allowing single or multiple item expansion. |
AccordionItems | protected | Element[] |
| Name | Privacy | Description | Parameters | Return | Inherited From |
|---|---|---|---|---|---|
expandmodeChanged | public | prev: AccordionExpandMode, next: AccordionExpandMode |
| Name | Type | Description | Inherited From |
|---|---|---|---|
change | Fires a custom 'change' event when the active item changes |
| Name | Field |
|---|---|
expand-mode | expandmode |
Component and Slot Mapping
| Fluent UI React 9 | Fluent Web Components 3 |
|---|---|
<Accordion> | <fluent-accordion> |
Property Mapping
| Fluent UI React 9 | Fluent Web Components 3 | Description of difference |
|---|---|---|
defaultOpenItems: number | expand: boolean | defaultOpenItems is a number property set on the Accordion corresponding to the intended AccordionItem to be expanded.<hr /> expand is a boolean property set directly on the AccordionItem intended to be expanded |
multiple: boolean | expand-mode: "single" | "multiple" |