---
description: Creates a selector input component.
---

# Dropdown selector

The selector input contains the following properties:

* **Placeholder Value**: the text that will appear as a placeholder, before the user chooses an option. It can be set statically in the design tool, or bound to API data.
*   **Options**: This list consists of choices for the selector input. Each choice includes:

    * **Label: T**he text visible to the user in the dropdown selector.
    * **Value**: Represents the data sent to the API.&#x20;

    The label and value can be identical and the options can be statically set in the design file or dynamically linked to API data.
* **Input Destination**: This will be the variable defined in the [POST request body](../../../connect-api/set-up-api-requests/creating-an-api-collection/airtable/data-library-connect-to-any-api-post-request#how-to-set-up-a-post-request), which will take the value of the chosen option.&#x20;

## 👉 **The Tags** <a href="#the-tags" id="the-tags"></a>

The dropdown selector component allows users to choose one option from multiple choices. It can be used either statically or dynamically bound to an API.

**📍 Where to add the tag:** A **text** component inside a [form.](data-biding-send-form-input-to-a-database)

```
[component:input-select]
```

**Note:** This input component is part of a form and should include a <mark style="color:red;">`[action:submit]`</mark> tag.

## Static data from Figma <a href="#static-data-from-figma" id="static-data-from-figma"></a>

To define the selector options statically within the tag, use:

```
[component:input-select:value1=label1,value2=label2,value3=label3]
```

Example:&#x20;

<mark style="color:red;">`[component:input-select:pet1=Cat, pet2=Dog, pet3=Bird]`</mark>

If you want the static options **label** and **value** to match:

```
[component:input-select:Label1,Label2,Label3]
```

Example:

<mark style="color:red;">`[component:input-select:Cat, Dog, Bird]`</mark>\
\
In case you want to define static **empty options,** follow:

```
[component:input-select:value1=label1,value2=label2,=None]
```

{% hint style="warning" %}
The <mark style="color:red;">`[component:input-select]`</mark>component **does not support the** [<mark style="color:red;">`:required`</mark>](..#adding-a-required-input-field) attribute and **requires an option selection by default**.  However its possible to add an empty option such as "=None" so users can select an empty value.
{% endhint %}

Example:&#x20;

<mark style="color:red;">`[component:input-select:pet1=Cat, pet2=Dog, pet3=Bird, =None]`</mark>

<figure><img src="https://1444025092-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MXpqEanvOhm8vMtIH8i%2Fuploads%2Fxa23LMslg4LZ5QkNjQdc%2FDropdown_static.png?alt=media&#x26;token=833229f2-5a8b-4c9a-b7ce-b9b1ca4b947f" alt=""><figcaption><p>How to set up static tag in Figma for a dropdown selector component</p></figcaption></figure>



## Dynamic data from an API <a href="#dynamic-data-from-an-api" id="dynamic-data-from-an-api"></a>

To bind dynamic data to the dropdown selector, ensure you have an API collection ready in Bravo. Use a POST or PATCH request since this component is part of a form.

1. In the Figma design, make sure to create this tag within a [form]().
2. Add the tag <mark style="color:red;">`[component:input-select]`</mark> in a **text** component in the design file.&#x20;

![](https://1444025092-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MXpqEanvOhm8vMtIH8i%2Fuploads%2FWklc9IwIEx8jzdwdeITP%2FDropdown_dynamic.png?alt=media\&token=33e6330d-5308-4d54-9108-fac0d541253a)

{% hint style="warning" %}
Don't surround the labels/values with commas and don't add any spaces inside the tag.
{% endhint %}

3. [Import the design file](../../good-to-know/faq/importing-a-design-file) into Bravo if not done yet. If already imported, sync the file and go to the app's binding section.
4. Ensure you have created a valid [POST request](../intro-and-onboarding/post-login-page-onboarding) beforehand. &#x20;
5. Bind the `input-select` element to the **Form data** property to the variable defined in the [POST request body](../../../connect-api/set-up-api-requests/creating-an-api-collection/airtable/data-library-connect-to-any-api-post-request#how-to-set-up-a-post-request) that you want to bind to the form. This body might have more variables, that you might want to bind to other input fields, in case the form has more.
6. Bind the **Options** property to a **list data record**. Set the **Label** and **Value** properties to the corresponding data from the API. Remember that the **Label** is the property the user will see in the app, while the **Value** is the actual data sent via API request. In this example below, those two properties are connected to the same data item, but they don't always have to.

![](https://1444025092-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MXpqEanvOhm8vMtIH8i%2Fuploads%2F12Entl52qrI7KitK7WMp%2FDropdown_dynamic.png?alt=media\&token=140b8945-0f7a-44b9-8839-cc18807d1b28)

7. Optionally, you can bind the **Form Initial Value** to a **GET request.** This is useful if you enable data editing.
8. Finally, bind the **Form response actions (On success or On Error).**
9. Now, the selector input component should be ready! Test and preview it on **Bravo Vision**. 🚀

## 💾 Example files <a href="#example-files" id="example-files"></a>

Duplicate the files below to see how to set it up!

{% embed url="https://www.figma.com/community/file/981976861747536392" %}
