Floating UI can be loaded via CDN using ESM or UMD format.
ESM: Skypack lets you load ES modules in the browser:
<script type="module">
import * as FloatingUIDOM from 'https://cdn.skypack.dev/@floating-ui/[email protected]';
</script>
Use this in production.
<script type="module">
import * as FloatingUIDOM from 'https://cdn.skypack.dev/@floating-ui/[email protected]?min';
</script>
UMD:
<script src="https://unpkg.com/@floating-ui/[email protected]"></script>
<script src="https://unpkg.com/@floating-ui/[email protected]"></script>
Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.