> ## Documentation Index
> Fetch the complete documentation index at: https://docs.velt.dev/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](/realtime-collaboration/live-selection/customize-behavior).

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

  <Tab title="Other Frameworks">
    ```js theme={null}
    if (Velt) {
      const selectionElement = Velt.getSelectionElement();
      selectionElement.enableLiveSelection();
      selectionElement.disableLiveSelection();
    }
    ```
  </Tab>
</Tabs>
