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

# Example

Here's an example which showcases all the available UI elements:

<figure><img src="https://3976361882-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdmhMqeTOjlv8oOvwP6NX%2Fuploads%2FJGStisHByw3mlsrxLNwb%2FCaptura%20de%20pantalla%202022-12-03%20231017.png?alt=media&amp;token=9d675e52-9dec-4717-b66a-5cb7c9a8eb30" alt="Preview"><figcaption><p>Preview</p></figcaption></figure>

{% code overflow="wrap" %}

```lua
local Library = loadstring(game:HttpGet("https://bitbucket.org/cat__/turtle-ui/raw/main/Module%20v2"), "Turtle UI")()

local Main = Library:Window("Main")
local Settings = Library:Window("Settings")

Main:Label("Label")

Main:Button("Button", function(Func)
    print("This is a button")
end)

Main:Toggle("Toggle", false, function(State, Func)
    print("Toggle:", State)
    Func.Text = State and "Toggle Enabled" or "Toggle Disabled")
end)

Main:Slider("Slider", 1, 100, 50, function(Value, Func)
    print("Slider:", Value)
end)

Main:Box("Box", function(Text, Focused, Func)
    if Focused then
        print(Text)
    end
end)

Main:Dropdown("Dropdown", {"A", "B", "C"}, function(Selected)
    print("Dropdown:", Selected)
end, true)

Main:ColorPicker("ColorPicker", Color3.fromRGB(255, 255, 255), function(Color, Func)
    print("ColorPicker:", Color)
end)

Main:Bind("Bind", Enum.KeyCode.F, false, function(State, Func)
    print("Bind:", State)
end)

Settings:HideUI()
Settings:MinimizeWindows()
Settings:DestroyUI()
```

{% endcode %}
