import { copyToClipboard } from "@corets/clipboard-helpers"
copyToClipboard("some value")
Behind the scenes, a hidden input element is rendered to perform the copy action. Sometimes you might want to specify a custom render target, for example when using a focus trap:
import { copyToClipboard } from "@corets/clipboard-helpers"
copyToClipboard("some value", "#target")
// or
copyToClipboard("some value", document.getElementById("target"))