thomas-lowry / figma-plugin-ds

A small lightweight design system for use in Figma Plugins
MIT License
693 stars 71 forks source link

Web Components? #18

Closed gossi closed 4 years ago

gossi commented 4 years ago

After using your lib more often, I might have the idea, that web-components might be a good way to distribute it (at least for those components that need javascript backup). What brought me to web-components rather than using an existing FE framework:

Have you also thought about this? What's your stance?

thomas-lowry commented 4 years ago

I have been thinking about it. I am not as well versed in web components yet but not opposed to exploring them. I did a bit more digging just before I built the Svelte version of this (which you may want to check out). My hope is to support this in a few flavors and then expand upon the number of components.

If interested in the Svelte one: https://github.com/thomas-lowry/figma-plugin-ds-svelte https://github.com/thomas-lowry/figsvelte (boilerplate)

One question: Do you think this be a separate repo/flavor? There is a certain approachability to not having them for those who just know basic html and css which may also be desirable?

What I was hoping to do with this repo

gossi commented 4 years ago

Amazing work over there, without even knowing svelte ;)

Here are my thoughts on this:

To bootstrap this:

Figma asks which template it should use to create a new plugin, I think these can be extended to even have a more package-oriented one (still vanilla technology stack). E.g. what I did here: https://github.com/gossi/figma-style-references/ (I restructred the folders a bit more to my flavor). On top of this could be templates that put your favorite framework/library on top of it, so you can choose to use svelte/glimmer/react/...

More focus to the base-/groundwork and a slim layer on top for each lib/framework. Sounds to me like a more flexible approach to serve more flavors while still maintainable.

thomas-lowry commented 4 years ago

I decided to keep this as vanilla html and css. Web components may be another future avenue. Goal of this project is to make it easier to new comers with html, css, and a little JS knowledge. Would love to keep the convo going though for another version of this repo!

BTW I really like Style References!