# getProperty

## Description

Returns the attribute of a component, such as its name, dimensions etc.

## Input / Parameter

| Name        | Description                                                             | Input Type  | Default | Options | Required                       |
| ----------- | ----------------------------------------------------------------------- | ----------- | ------- | ------- | ------------------------------ |
| component   | The name of the component to get property from.                         | String/Text | -       | -       | Yes, if componentId is not set |
| componentId | The component ID to get property from (for components in FlatList item) | String/Text | -       | -       | Yes, if component is not set   |
| property    | The attribute of the component.                                         | String/Text | -       | -       | Yes                            |

## Output

| Description                            | Output Type |
| -------------------------------------- | ----------- |
| Returns the property of the component. | String/Text |

## Example

In this example, we will get the name attribute of an input box component using `Component.getProperty` and print it to the console.

### Steps

1. First we drag an input box onto the page. We will name it "InputBox" with the value "This is an input field".

   ![](/files/LVmtxwBow6MXlVmcsVg1)
2. We want to get the 'name' attribute of "InputBox" and display it in the browser console with the help of the `Log.write` helper function.
3. Drag `Component.getProperty` into the event flow, and specify the name of the component, which in this case is "InputBox".

   ![](/files/z2s9kiSLEuvzNSBxvSlp)

### Result

1. The `name` attribute of "InputBox" will be displayed in the browser console.

   ![](/files/ORjrrwRq0IfZtR7ubeG3)

## Links

### Related Information

See also:

* Functions
  * [Component.setProperty](https://github.com/OrangeKloud/emobiq-documentation/blob/master/document/client/gitbook/2-5-actions-and-visual-logic/action-reference/react-native/Component/setProperty/README.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/react-native/component/getproperty.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
