Documentation
Design
Components
Collapsible

EccUtilsDesignCollapsible Component

2.0.0-alpha.6
<ecc-utils-design-collapsible/>
EccUtilsDesignCollapsible

Overview

The ecc-utils-design-collapsible component is used to create interactive content sections that can be expanded or collapsed. It is a compound component composed of a trigger and content area.

This component is built with three parts: ecc-utils-design-collapsible (the root), ecc-utils-design-collapsible-trigger (the control), and ecc-utils-design-collapsible-content (the collapsible area).

Usage

Basic Collapsible

This example shows a simple collapsible section with a trigger button and content.

Toggle Content

This is the collapsible content.

Components

The Collapsible is built by combining these components:

ComponentTag NameDescription
Collapsibleecc-utils-design-collapsibleThe root container for the collapsible.
CollapsibleTriggerecc-utils-design-collapsible-triggerThe button or element that toggles the content.
CollapsibleContentecc-utils-design-collapsible-contentThe content that is shown or hidden.

Properties

EccUtilsDesignCollapsible

PropertyTypeDefaultDescription
openbooleanfalseWhen true, the collapsible is open.
disabledbooleanfalseWhen true, disables the collapsible.

open

Controls whether the collapsible content is visible. Can be used for controlled components.

<EccUtilsDesignCollapsible open={true}>
  ...
</EccUtilsDesignCollapsible>

disabled

When true, prevents the collapsible from being toggled and disables the trigger.

<EccUtilsDesignCollapsible disabled={true}>
  ...
</EccUtilsDesignCollapsible>

Events

EccUtilsDesignCollapsible

Event NameReact Event NameDetail TypeDescription
ecc-collapsible-toggledonEccCollapsibleToggled{ open: boolean }Fired when the collapsible is opened or closed.

ecc-collapsible-toggled

This event is fired when the user clicks the trigger to open or close the content.

<EccUtilsDesignCollapsible 
  onEccCollapsibleToggled={(event) => {
    console.log('Collapsible state:', event.detail.open);
  }}
>
  ...
</EccUtilsDesignCollapsible>
Elixir Cloud & AAICloud SDKElixir

Released under Apache 2.0 License.

Copyright © 2023-2025 ELIXIR