-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Description
Describe the bug
When renaming prop with object destructing for example let {class: className} = $props()
this <Component class='red' />
doesn't work but <Component className='red' />
works.
Reproduction
Component.svelte
<script>
let {class: className} = $props()
</script>
<button class={className}>
Button
</button>
<style>
.red {
background-color: red;
}
</style>
Doesn't work
<Component class='red' />
Works
<Component className='red' />
Logs
No response
System Info
System:
OS: Windows 11 10.0.22621
CPU: (16) x64 AMD Ryzen 7 1700 Eight-Core Processor
Memory: 23.53 GB / 31.94 GB
Binaries:
Node: 20.8.1 - C:\Program Files\nodejs\node.EXE
npm: 10.1.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 8.9.0 - ~\AppData\Local\pnpm\pnpm.EXE
Browsers:
Edge: Chromium (120.0.2210.61)
Internet Explorer: 11.0.22621.1
npmPackages:
svelte: 5.0.0-next.22 => 5.0.0-next.22
Severity
annoyance
brunnerh, braden-w, Not-Jayden, OllieJT and AgarwalPragy