> ## 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.

# Label Element

> Label Element — CometChat documentation.

The `LabelElement` class enables the creation of a label element in a user interface.

### Parameters

| Name | Type | Description |
| - | - | - |
| **elementId** | `string` | This property in constructor accepts the ID for the element |
| **label** | `string` | This property in constructor accepts the text for the label |

### Class Usage

Here's an example of how you can create an instance of the `LabelElement` class:

In this example, a new instance of `LabelElement` is created with the elementId "1" and the label text "Username".

### Example

Here is an example that showcases the creation and manipulation of an instance of `LabelElement`:

<Tabs>
  <Tab title="Swift">
    ```swift theme={null}
    labelElement = LabelElement()
    labelElement.elementId = "1"
    labelElement.label = "Username"
    ```
  </Tab>
</Tabs>


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