Migration from 1.0 to 2.0
The 2.0 release introduced a few breaking changes; see below.
Switch to bind:
for Listbox, RadioGroup, and Switch
These three components previously required you to use a on:change
event listener to update their values. These have been changed to use two-way binding with the bind:
directive.
Listbox
<!-- Old -->
<Listbox value={foo} on:change={(e) => foo = e.detail}>
...
</Listbox>
<!-- New -->
<Listbox bind:value={foo}>
...
</Listbox>
RadioGroup
<!-- Old -->
<RadioGroup value={foo} on:change={(e) => foo = e.detail}>
...
</RadioGroup>
<!-- New -->
<RadioGroup bind:value={foo}>
...
</RadioGroup>
Switch
<!-- Old -->
<Switch checked={foo} on:change={(e) => foo = e.detail}>
...
</Switch>
<!-- New -->
<Switch bind:checked={foo}>
...
</Switch>
Renamed transition events
Events emitted by the Transition
components have been renamed for better consistency with the event names used natively in Svelte. Specifically,
beforeEnter
is nowintrostart
afterEnter
is nowintroend
beforeLeave
is nowoutrostart
afterLeave
is nowoutroend
Full version history
This is the release history of Svelte Headless UI and the correspondence with versions of Headless UI. Click on a version number to see the documentation for that version.
Svelte Headless UI version | Date released | Headless UI version | Notes |
---|---|---|---|
2.0.0 | 2023-06-11 | 1.4.2 | Switches to bind: for three components; renames transition events; uses <svelte:element> internally |
1.0.2 | 2022-05-25 | 1.4.2 | Fixes TypeScript errors with some attributes |
1.0.1 | 2022-05-16 | 1.4.2 | Fixes a SSR error when using the as prop on buttons |
1.0.0 | 2022-05-06 | 1.4.2 | Much improved TypeScript support; much smaller bundle size |
1.0.0-beta.12 | 2022-03-07 | 1.4.2 | Hotfix to replace an incorrect fix in 1.0.0-beta.11 |
1.0.0-beta.11 | 2022-03-06 | 1.4.2 | |
1.0.0-beta.10 | 2022-02-27 | 1.4.2 | |
1.0.0-beta.9 | 2022-02-06 | 1.4.2 | |
1.0.0-beta.8 | 2022-01-21 | 1.4.2 | |
1.0.0-beta.7 | 2021-12-31 | 1.4.2 | |
1.0.0-beta.6 | 2021-12-29 | 1.4.2 | |
1.0.0-beta.5 | 2021-12-28 | 1.4.2 | |
1.0.0-beta.4 | 2021-12-26 | 1.4.2 | |
1.0.0-beta.3 | 2021-12-24 | 1.4.2 | Initial public release |
Full release notes and changelogs can be found on GitHub.