(Work in Progress) Skeleton v3 Beta Migration Guide #2921
endigo9740
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Warning
This guide is a work in progress. Look for the full announcement on Tuesday, November 5th.
This guide covers migrating from Skeleton v2 to the Skeleton v3 Beta. Please be aware that Skeleton v3 is a massive update and overhaul with a significant number of changes when compared to prior versions. We want to set clear expectations upfront that this will be an involved migration process. We recommend you read through the full guide before you begin the migration process.
We are providing this migration guide as early as possible to enable the community to test and provide feedback for both Skeleton v3 and the migration process itself. We expect this guide will grow and evolve as we gather feedback and get closer to the final release. If you experience issues, please report them in the comments section below or via the
#skeleton-next
channel on Discord.Beta Disclaimer
Caution
Framework Support
Skeleton has historically only supported Svelte/Kit, so the following guide is geared towards Svelte/Kit-based web applications. For all other frameworks, please refer to the growing Skeleton v3 Onboarding section.
Tips for Migrating
v3
branch in your project where you handle the migration process. This allows you to update slowly over time, easily roll back changes, or even drop the branch if you're not satisfied with the update.Prerequisites
Before you begin, make sure you have migrated your Skeleton v2.x project to Svelte 5:
Your project should meet the following criteria before proceeding:
Migration Guide
Caution
Skeleton v3 features a major rewrite of nearly every feature in the library - adapting to the new Svelte 5 component APIs, new features, and of course new internal conventions. As such, you may find the migration process more open ended than prior migration guides. However, this should cover the most import steps required. If you get stuck, please reach out in the comments section below, or in the
#skeleton-next
channel on Discord.Video Tutorial
Before you begin, consider watching our Video Tutorial. This showcases the complete migration process from start to finish for a real world application. Timestamps have been provided if you wish to skip to a particular topic.
1. Remove the v2.x Packages
2. Follow the Onboarding Guide
Follow from Step 2 and forward on the onboarding guide. This will accomplish the following:
skeleton
(core) andskeleton-svelte
(component) packages.@types/node
package to prevent Tailwind config type errors.tailwind.config
to use the latest settings.3. Update Your Theme
For Preset Themes
Browse the 20+ available themes, then register one or more themes.
For Custom Themes
If you wish to migrate a custom theme. Follow the steps below:
4. Replace AppShell with Custom Layouts
Skeleton has dropped the (very troubled)
<AppShell>
component in favor of user-defined layouts. We've provided a Layouts guide for building common page structures using only HTML and Tailwind - no Skeleton specific features needed!5. Update Utility Classes
Skeleton utility classes have been rewritten from the ground up and feature numerous changes. This includes:
-token
.-token
.Here's a quick comparison of utility class changes from v2 to v3:
6. Update Tailwind Elements
The vast majority of Element classes (ex: buttons, cards, etc) retain the same names from Skeleton v2. We have, however, moved a number of these features to Cookbook guides, built using simple Skeleton and Tailwind primitives.
7. Update Tailwind Blocks
All Tailwind Blocks will now reside in the new Cookbook section:
8. Update Svelte Components
Components have undergone the biggest update in Skeleton v3. Given the sheer number of breaking changes, we recommend you compare each component to it's equivalent v3 documentation. Here's some of the key changes you may encounter:
@skeletonlabs/skeleton-svelte
.Here's a quick comparison of these changes for a single component from v2 to v3:
You can review the most notable changes to components in the list below:
<AppRail>
<Navigation>
; greatly expanded features.<FileButton>
<FileUpload>
; merges<FileDropzone>
features.<FileDropzone>
<FileUpload>
; merges<FileButton>
features.<InputChip>
<TagsInput>
.<Paginator>
<Pagination>
.<ProgressBar>
<Progress>
.<ProgressRadial>
<ProgressRing>
.<RadioGroup>
<Segment>
(aka Segment Control).<RangeSlider>
<Slider>
.<SlideToggle>
<Switch>
.<TreeView>
9. Replace Non-Supported Features
Earlier this year we began to reflect on what features should remain as part of the core experience in Skeleton. As such, we've identified a number of features that fall outside that scope. Don't fret though, we've gone out of our way to provide alternatives to supplement and replace these within your project. Not only do we expect these alternatives to work better long term for you, but you can expect Skeleton's total number of components to continue to grow rapidly post-release thanks to Zag.
Svelte Actions
Components
<AppShell>
<Autocomplete>
<ConicGradient>
<Lightswitch>
<ListBox>
<Stepper>
<Table>
Utilities
Support
Please report all issues via Discord or the comments section below.
Beta Was this translation helpful? Give feedback.
All reactions