> For the complete documentation index, see [llms.txt](https://solidocean.gitbook.io/last-ui/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://solidocean.gitbook.io/last-ui/basics/ui-elements.md).

# UI Elements

The **Scenes** folder contains a **“test items”** scene, which demonstrates how to use UI elements. This scene allows you to test the **toggle, slider, and horizontal selector** components.

### **Using the Slider**

Last UI utilizes Unity's default **Slider** component. To learn more about how it works, refer to the Unity documentation:\
[**Unity Slider Documentation**](https://docs.unity3d.com/560/Documentation/Manual/script-Slider.html)

### **Using the Toggle**

Last UI utilizes Unity's default **Toggle** component. For more details, check out the documentation:\
[**Unity Toggle Documentation**](https://docs.unity3d.com/560/Documentation/Manual/script-Toggle.html)

### **Using the Horizontal Selector**

An example script for Horizontal Selector can be found in the **Scripts** folder "**DemoItems.cs"**. You can also check the **demoitems** scene for a working example.

#### **Step-by-Step Guide**

1. Create a new **script**.
2. Add the following code to define the **Horizontal Selector** component:

   ```csharp
   public HorizontalSelector hSelector;
   public string value;
   ```
3. Retrieve the **Horizontal Selector** value using the code below:

   ```csharp
   value = hSelector.value;
   ```

This value can be used for any functionality as needed.

With this guide, you should be able to set up and use Last UI smoothly. If you need further assistance, feel free to contact us. Happy coding!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://solidocean.gitbook.io/last-ui/basics/ui-elements.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.
