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.
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.
React / Next.js
Other Frameworks
const { client } = useVeltClient();
useEffect(() => {
if (client) {
const selectionElement = client.getSelectionElement();
selectionElement.enableLiveSelection();
selectionElement.disableLiveSelection();
}
}, [client]);
if (Velt) {
const selectionElement = Velt.getSelectionElement();
selectionElement.enableLiveSelection();
selectionElement.disableLiveSelection();
}