DEV Community

loading...

Element UI in Svelte

mistlog profile image mistlog ・1 min read

You may want to develop svelte app in another way: use svelte-draft. This site with live editing is implemented in svelte-draft itself and svelte-element.

svelte-element provides vanilla svelte component, so that you can use in both svelte and svelte-draft.

I'm not good at UI engineering, however, take this button implementation as an example:

carbon

The skeleton is clear: receive props -> config state -> provide UI.

carbon (1)

As for state:
carbon (2)

I do believe that code will be maintainable in this way.

Discussion (1)

pic
Editor guide
Collapse
dansvel profile image
dan

wow, interesting concept,,

but it's feel weird for me,,

nice share,,