Can attribute names be preserved as is?

Dear team,

It would be helpful if attribute names are not sanitised too aggressively. Attempting to use non-standard attribute names, like @click get converted to click which can break integrations with certain javascript frameworks (Alpinejs) in this case.

When you use Alpine.js in BSS don’t use shortcuts for the attributes so in your case it will work if you add the click attribute like this x-on:click instead of @click

Hey @kuligaposten thanks for the feedback, really appreciate it.

I came to the same realisation that I need to use the full attribute name. It just felt like a good tweak the BSS team could add to broaden the flexibility of the awesome tool their building.

Thank you for the suggestion! The problem is that “@” can’t be part of a valid attribute name in the HTML standard. Loosening the validation of these attributes would result in many people generating invalid HTML without knowing and running into issues.

1 Like

Got it, thanks for the response!