# Select Remote

The `io.kvision.form.select.SelectRemoteInput` component, contained in `kvision-select-remote` module, is a special component you can use to render a select box with options loaded from the server.  `SelectRemoteInput` is bound directly to the method of the remote service. The method signature looks like this:

```kotlin
import dev.kilua.rpc.annotations.RpcService
import dev.kilua.rpc.SimpleRemoteOption

@RpcService
interface IDictionaryService {
    suspend fun dictionary(state: String?): List<SimpleRemoteOption>
}
```

The `state` parameter allows you to send optional, additional data to the backend service, with the help of the `stateFunction` parameter of the `SelectRemoteInput` constructor.

The `SimpleRemoteOption` class is defined as:

```kotlin
@Serializable
data class SimpleRemoteOption(
    val value: String,
    val text: String? = null
)
```

and allows to send value and label for every option.

To use `SelectRemote` form control, you initialize it with the `ServiceManager` instance and a callable reference to the right method.&#x20;

```kotlin
SelectRemote(serviceManager = getServiceManager<IDictionaryService>(), 
    function = IDictionaryService::dictionary,
    stateFunction = { someState.toString() },
    label = "Select option from the dictionary"
)
```


---

# 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://kvision.gitbook.io/kvision-guide/5.-fullstack-development-guide/select-remote.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.
