Skeleton v3 Update - Zag 1.0 and Preparing for Release #3281
Replies: 1 comment 3 replies
-
If I can't use $bindable and everything same as in React, why do I need to use Svelte in the first place? |
Beta Was this translation helpful? Give feedback.
-
Hey everyone, Chris here from the Skeleton team. With Skeleton v3 RC2 now enabling support for Tailwind v4, I wanted to take a moment to detail a quick follow up or our existing RC2 users. As well as share our plans between now and the upcoming launch for Skeleton v3.
RC2 + Tailwind Vite Plugin Quick Fix
First up, if you're already using the Skeleton v3 RC2 with Tailwind v4, we wanted to alert everyone to a last minute configuration change to avoid a known Tailwind v4 issue where components from
node_modules
may suddenly lose their styling.Note that this ONLY affects projects using the Tailwind Vite plugin, which includes: SvelteKit, Vite/React, Vite/Svelte, and Astro. This will not affect Next.js projects or anyone that chose to stick with the Tailwind PostCSS plugin.
The change is simple, simply append
/dist
to the end of the@source
path in your global stylesheet configuration.Please note that all related documentation and migration guides have been updated accordingly.
Zag 1.0 and Svelte Component API Change
As you may know, Skeleton currently utilize Zag.js as the foundation for all Skeleton v3 components. This provides a headless solution for implementing common component patterns, including state and logic in an accessible and cross-framework manner.
Recently Zag has launched their big v1.0 release, which includes some significant performance improvements. As such, we're currently implementing these changes. Thankfully this has no inherent breaking changes to the component APIs.
However, the Skeleton team is going to use this opportunity to revisit our components and make a very specific change for Svelte components. Essentially we're going to move away from Svelte's two-way data binding syntax,
bind:
and$bindable()
, in favor of matching Zag's intended data model:Here's a quick before and after comparison of this change:
While a bit more verbose, it's worth considering why we're moving away from
$bindable
specifically:$effect()
to be notified of changes (which is an anti-pattern)<Example {...attributes} />
, asbind
is explicit....
, as again,$bindable()
is explicitAdditionally, by moving away from
$bindable
, Skeleton can now implement components much closer to the original Zag spec. The result is a MUCH slimmer implementation of the component logic:Simplifying the logics helps us avoid misinterpretation and errors in the logic. In fact, we've already been able to resolve number of current v3 bugs by stripping out the extra abstraction required to support
$bindable
, including the following:.
(dot) notation components asPURE
. #3225useId
with$props.id
. #3215Additionally, one of the primary goals is to standardize our component API cross-framework. Doing so has a number of benefits:
While we have already implemented this change, and we're fairly confident about merging this soon, we do actually wish to hear the community's thoughts on this. I know change in itself is scary. Most of us prefer to stick with framework specific paradigms when we can. However, I hope you'll approach this with an open mind. Especially once you get your hands on the update!
Preparing for the v3 Launch
With Tailwind v4 support now in place, and the Zag update dropping soon, we're coming to the end our dev roadmap for Skeleton v3. Some final documentation and bugfixes aside, we're beginning to prep for the full v3 launch.
As such, we want to give as much notice as possible that this is coming. We don't have a firm release date, but essentially we're going to aim for roughly 1-2 weeks after the Zag updates are released, which should arrive sometime next week.
If you have any questions about what remains, or our plans before or after launch, please feel free to reach out and let us know in the comments.
Thanks everyone!
Beta Was this translation helpful? Give feedback.
All reactions