Accordion APIs

See below to learn more about properties, slots, events, style variables, CSS parts, and methods.

There is no difference between the APIs of the elements, And the only difference is in the names of the events

Properties

Name
disabled
Type
boolean
Default
undefined
Attribute
disabled
Reflect
true
Description

Disables the element functionality.

Name
open
Type
boolean
Default
undefined
Attribute
open
Reflect
true
Description

Control the element to expand or not.

Name
summary
Type
string
Default
undefined
Attribute
summary
Reflect
false
Description

The summary text displayed on the header.

Name
overrides
Default
undefined
Attribute
overrides
Reflect
false
Description

Overrides default configuration for specific breakpoints. See Overrides for details.

Name
variant
Default
undefined
Attribute
variant
Reflect
true
Description

See Variant for details.

Slots

Name
default
Description

The default slot.

Name
icon
Description

The icon slot.

Name
icon-expand
Description

The expand icon slot.

Name
icon-collapse
Description

The collapse icon slot.

Name
summary
Description

The summary slot.

Name
top
Description

The top slot.

Name
middle
Description

The middle slot.

Name
bottom
Description

The bottom slot.

Events

Name
plus-collapse
Type
EventEmitter<void>
Cancelable
true
Description

Fires when the element is about to collapse. This event can be canceled.

Name
plus-collapsed
Type
EventEmitter<void>
Cancelable
false
Description

Fires after the element has collapsed.

Name
plus-expand
Type
EventEmitter<void>
Cancelable
true
Description

Fires when the element is about to expand. This event can be canceled.

Name
plus-expanded
Type
EventEmitter<void>
Cancelable
false
Description

Fires after the element has expanded.

CSS Variables

There are no CSS Variables.

CSS Parts

Name
body
Description

The body element.

Name
content
Description

The content element.

Name
summary
Description

The summary element.

Name
svg
Description

The svg element.

Methods

Name
collapse
Type
Promise<boolean>
Signature
collapse() => Promise<boolean>
Description

Collapses the element.

Name
expand
Type
Promise<boolean>
Signature
expand() => Promise<boolean>
Description

Expands the element.

Name
toggle
Type
Promise<boolean>
Signature
toggle() => Promise<boolean>
Description

Toggles between collapse and expand state.