> ## Documentation Index
> Fetch the complete documentation index at: https://velt.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Setup

## Get the Live Selection Element and enable it

When enabled, Live Selection will automatically detect and highlight user's presence on the following elements:

* `input`
* `textarea`
* `button`
* `contenteditable`

You can learn more about customizing and controlling which elements are highlighted and its styling [here](https://velt.dev/docs/realtime-collaboration/live-selection/customize-behavior.md).

> [tab] React / Next.js
>
> ```js theme={null}
> const { client } = useVeltClient();
> useEffect(() => {
>   if (client) {
>     const selectionElement = client.getSelectionElement();
>     selectionElement.enableLiveSelection();
>     selectionElement.disableLiveSelection();
>   }
> }, [client]);
> ```

> [tab] Other Frameworks
>
> ```js theme={null}
> if (Velt) {
>   const selectionElement = Velt.getSelectionElement();
>   selectionElement.enableLiveSelection();
>   selectionElement.disableLiveSelection();
> }
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.