svelte-headlessui icon indicating copy to clipboard operation
svelte-headlessui copied to clipboard

Support Svelte 4

Open silenceofthewans opened this issue 1 year ago • 14 comments

Yes, I'll be hoping to release official Svelte 4 compatibility soon, but I haven't tested it out much yet because some of my dependencies need to be upgraded.

In the meantime, please let me know if anyone has been using the library with Svelte 4 successfully or unsuccessfully. From what I've seen it should be fine, but this library's internals do some pretty sophisticated things in a few places, which is why I haven't just bumped the peerDependencies without doing some testing first.

rgossiaux avatar Jun 29 '23 18:06 rgossiaux

I've been using Menu and Listbox in my app and they seem to be working fine can't say much for other components.

silenceofthewans avatar Jun 30 '23 03:06 silenceofthewans

I've been using the Popover component and everything is running smooth so far.

Robin-w151 avatar Jun 30 '23 07:06 Robin-w151

It seems to work well, no issue so far

AyeRlS avatar Jul 01 '23 14:07 AyeRlS

I've been using the Dialog component, no troubles atm.

JeremyDarbellay avatar Jul 02 '23 12:07 JeremyDarbellay

Switch component works fine

MaximumMaxxx avatar Jul 05 '23 17:07 MaximumMaxxx

Listbox has been working fine for me too.

vfrunza avatar Jul 18 '23 03:07 vfrunza

Has anyone found a workaround for the peer dependencies not being aligned to use while this issue sits in limbo?

MaximumMaxxx avatar Jul 18 '23 05:07 MaximumMaxxx

@MaximumMaxxx You should be able to just ignore the warning. I've been traveling lately but I plan on releasing an update to bump the peerDependencies in a week or two.

rgossiaux avatar Jul 18 '23 05:07 rgossiaux

In case anyone is wondering how to overwrite the peer dependencies - this worked for me:

"devDependencies": {
  ...
  "@rgossiaux/svelte-headlessui": "^2.0.0",
  "svelte": "^4.1.2",
  ...
},
"overrides": {
  "@rgossiaux/svelte-headlessui": {
    "svelte": "$svelte"
  }
}

padidas avatar Aug 01 '23 17:08 padidas

In case anyone is wondering how to overwrite the peer dependencies - this worked for me:

"devDependencies": {
  ...
  "@rgossiaux/svelte-headlessui": "^2.0.0",
  "svelte": "^4.1.2",
  ...
},
"overrides": {
  "@rgossiaux/svelte-headlessui": {
    "svelte": "$svelte"
  }
}

Thank you for this.

Have been using in production for two weeks with no issues @rgossiaux

zach-hopkins avatar Aug 10 '23 23:08 zach-hopkins

I'm using with Svelte v4 and it looks like the open prop in Disclosure is not working.

bradyisom avatar Sep 04 '23 20:09 bradyisom

Svelte 5 support? Unfortunately it's not backwards compatible and it's not as simple as version bump. Any plans to support svelte 5?

adminy avatar Mar 21 '24 14:03 adminy

I have created a new fork for us to share so we can fix these issues: https://github.com/PyongyangOpenSource/svelte-headlessui

Loizzus avatar Jul 01 '24 00:07 Loizzus