-
Notifications
You must be signed in to change notification settings - Fork 8
Description
For feature parity with Svelte 4.0 (and simply to enable the availability of uppercased props in custom element attributes), we should standardize on Lit-style attributes, per sveltejs/svelte#8457 (emphasis mine):
... and what the corresponding attribute for the property is (attribute, default lowercased prop name). These options are heavily inspired by lit: https://lit.dev/docs/components/properties.
e.g.
<custom-element foobar="baz></custom-element>
Where the element attribute foobar is automatically translated to its camelCase counterpart: fooBar, making it available in CustomElement.svelte as:
<script>
export let fooBar = '';
</script>
<div>{fooBar}</div>This should supersede the prior request to support kebab-style to camelCase conversions (issue #11), since that is apparently not the direction that Svelte 4 will be going. Sticking with Svelte's choice should make it easier for someone to migrate, if necessary. Just setting up this issue so I can track it and implement it when able.