{"id":12006,"date":"2022-03-09T11:27:16","date_gmt":"2022-03-09T16:27:16","guid":{"rendered":"http:\/\/local.brightwhiz\/?post_type=snippets&p=12006"},"modified":"2022-03-09T11:27:18","modified_gmt":"2022-03-09T16:27:18","slug":"floating-ui-cdn-cheatsheet","status":"publish","type":"snippets","link":"http:\/\/local.brightwhiz\/snippets\/floating-ui-cdn-cheatsheet\/","title":{"rendered":"Floating UI CDN Cheatsheet"},"content":{"rendered":"\n
Floating UI can be loaded via CDN using ESM or UMD format.<\/p>\n\n\n\n
ESM: Skypack lets you load ES modules in the browser:<\/p>\n\n\n\n
<script type="module">\n import * as FloatingUIDOM from 'https:\/\/cdn.skypack.dev\/@floating-ui\/dom@0.4.0';\n<\/script><\/code><\/pre>\n\n\n\nUse this in production.<\/p>\n\n\n\n
<script type="module">\n import * as FloatingUIDOM from 'https:\/\/cdn.skypack.dev\/@floating-ui\/dom@0.4.0?min';\n<\/script><\/code><\/pre>\n\n\n\nUMD:<\/p>\n\n\n\n
<script src="https:\/\/unpkg.com\/@floating-ui\/core@0.6.0"><\/script>\n<script src="https:\/\/unpkg.com\/@floating-ui\/dom@0.4.0"><\/script><\/code><\/pre>\n","protected":false},"comment_status":"open","ping_status":"closed","template":"","meta":[],"categories":[4,953,25,15,16,18],"tags":[954,328,350,424,433,449,591,635,638],"yoast_head":"\nFloating UI CDN Cheatsheet [Snippet]<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n