DEV Community

mistlog
mistlog

Posted on

3

Element UI in Svelte

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.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (1)

Collapse
 
dansvel profile image
dan

wow, interesting concept,,

but it's feel weird for me,,

nice share,,

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more