> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-llms-scoped-indexes.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# DropDown Element

> DropDown Element — CometChat documentation.

The `DropDownElement` class is utilised to create a single selection input element in a user interface.

### Properties

| Name | Type | Description |
| - | - | - |
| **elementId** | string | Used to set unique ID for the element |
| **label** | string | Used to set a label for the element |
| **options** | List\<OptionElement> | Used to set options for the element |
| **optional** | bool | Used to set optional flag for the element |
| **defaultValue** | String | Used to set default value for the element |

***

### Usage

Here's how to create an instance of the `DropDownElement` class:

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    DropdownElement(
        elementId: "Block",
        label: "Select block" ,
        options: [
            OptionElement(label: "A",value: "A" ),
            OptionElement(label: "B",value: "B" ),
        ],
    )
    ```
  </Tab>
</Tabs>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.