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

# Events

Lucky you, Enoria manages event connections automatically!

To connect a widget to an event, add it as a property with the event name (after "On") as the key and a `function` as the value:

```lua
e.TextButton("Click me", {
		OnClick = function()
			print("Clicked!")
		end,
})
```

Event names are the same than in the Roblox API, except for button clicks (`OnClick`, `OnRightClick`, `OnClickUp`, etc.) which are shorter.

Here's another example but with the `MouseEnter` event:

```lua
e.Container({
		OnMouseEnter = function()
			print("Mouse enter!")
		end,
		Child = e.TextLabel("This is text inside GreenContainer")
})
```

{% hint style="info" %}
There is no implementation for `GetPropertyChangedSignal` at the moment.
{% endhint %}
