whitefusionhq / crystallized

A collection of quality-of-life DX enhancements to Lit or "vanilla" web components
MIT License
20 stars 1 forks source link

data- atrributes for actions and targets #13

Open lubomirblazekcz opened 1 year ago

lubomirblazekcz commented 1 year ago

Hello @jaredcwhite, first of I really love the idea behind Crystallized, I've been looking for a Stimulus alternative that would leverage native web components api and this is exactly what I had in mind! No abstractions, just simple and rich functionality that any web needs.

The only thing I dislike a little, is missing prefixes for attributes or the lack of customization for that. I personally prefer data- attributes and think it might a better aproach, and dataset property can be also leveraged this way on elements. Also I think it's more close to standards, as using custom attributes is discouraged, or at least they should be prefixed in some way.

Would you consider adding an option for prefix, similiar to https://stimulus.hotwired.dev/handbook/installing#overriding-attribute-defaults?

jaredcwhite commented 1 year ago

Hi @lubomirblazekcz, thanks for the feedback! The TL;DR is I've largely moved on to another project I'm hoping to release soon which takes some of these ideas but packages them up in more of a complete fullstack Web Component solution (essentially a competitor to Lit). But if you'd be willing to submit a PR (I could offer a few pointers), I'm happy to merge that in.