Child component of Accordion

API reference

Properties

PropertyAttributeDescriptionTypeDefault
descriptiondescription

Specifies a description for the component.

string
expandedexpanded

When true, expands the component and its contents.

booleanfalse
headingheading

Specifies the component's heading text.

string
headingLevelheading-level

Specifies the heading level number of the component's heading for proper document structure, without affecting visual styling.

HeadingLevel
iconEndicon-end

Specifies an icon to display at the end of the component.

IconName
iconFlipRtlicon-flip-rtl

Displays the iconStart and/or iconEnd as flipped when the element direction is right-to-left ("rtl").

FlipContext
iconStarticon-start

Specifies an icon to display at the start of the component.

IconName
messageOverrides

Overrides individual strings used by the component.

Record<string, unknown> | undefined

Slots

NameDescription
default (unnamed)

A slot for adding custom content, including nested calcite-accordion-items.

actions-end

A slot for adding calcite-actions or content to the end side of the component's header.

actions-start

A slot for adding calcite-actions or content to the start side of the component's header.

content-end

A slot for adding non-actionable elements after the component's header text.

content-start

A slot for adding non-actionable elements before the component's header text.

Styles

NameDescription
--calcite-accordion-border-color

Specifies the component's border color.

--calcite-accordion-background-color

Specifies the component's background color.

--calcite-accordion-text-color

Specifies the component's text color.

--calcite-accordion-text-color-hover

Specifies the component's main text color on hover.

--calcite-accordion-text-color-press

Specifies the component's main text color when pressed.

--calcite-accordion-item-background-color
deprecated in v3.1.0, removal target v6.0.0 - Use --calcite-accordion-background-color instead. Specifies the component's background color.
--calcite-accordion-item-border-color
deprecated in v3.1.0, removal target v6.0.0 - Use --calcite-accordion-border-color instead. Specifies the component's border color.
--calcite-accordion-item-content-space

Specifies the component's padding.

--calcite-accordion-item-end-icon-color

Specifies the component's iconEnd color. Falls back to --calcite-accordion-item-icon-color or current color.

--calcite-accordion-item-expand-icon-color

Specifies the component's expand icon color.

--calcite-accordion-item-header-background-color

Specifies the component's heading background color.

--calcite-accordion-item-header-background-color-hover

Specifies the component's heading background color when hovered.

--calcite-accordion-item-header-background-color-press

Specifies the component's heading background color when pressed.

--calcite-accordion-item-heading-text-color

Specifies the component's heading text color.

--calcite-accordion-item-icon-color
deprecated in v3.1.0, removal target v6.0.0 - Use --calcite-icon-color instead. Specifies the component's default icon color.
--calcite-accordion-item-start-icon-color

Specifies the component's iconStart color. Falls back to --calcite-accordion-item-icon-color or current color.

--calcite-accordion-item-text-color
deprecated in v3.1.0, removal target v6.0.0 - Use --calcite-accordion-text-color instead. Specifies the component's text color.
--calcite-accordion-item-text-color-hover
deprecated in v3.1.0, removal target v6.0.0 - Use --calcite-accordion-text-color-hover instead. Specifies the component's text color on hover.

Events

NameDescriptionBehavior
calciteAccordionItemCollapse

Fires when the component's content area is collapsed.

bubblescomposed
calciteAccordionItemExpand

Fires when the component's content area is expanded.

bubblescomposed

Methods

NameDescriptionSignature
componentOnReady

Creates a promise that resolves once the component is fully loaded.

componentOnReady(): Promise<this>
setFocus

Sets focus on the component.

setFocus(options?: FocusOptions): Promise<void>

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.