vaheqelyan / svelte-grid

A responsive, draggable and resizable grid layout, for Svelte. [NOT MAINTAINED]

Home Page:https://svelte-grid.now.sh/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use it as "vanillajs" library?

CodeFetch opened this issue · comments

I'd like to build it as a library which I can use in non-Svelte projects. How is this possible?
Currently I'm writing a wrapper for achieving this, but maybe I'm just too stupid and there is an easier way?!

commented

i guess the only option is to build a web component

this may help you: https://svelte.dev/docs#run-time-custom-element-api

Personally i have never tried to compile a svelte component to a web component. There are few articles on this topic, you can do you own research.

I am not 100% sure, that you will succeed by doing this, because right now svelte has few issues with web-components

This article explains things really good https://javascript.plainenglish.io/can-you-build-web-components-with-svelte-3c8bc3c1cfd8