1. get started
  2. installation
  3. sveltekit

SvelteKit

Install and conifigure SvelteKit.

WARNING: this page is a preview. Skeleton v3 is not yet available. The following instructions will fail.

1

Create a Project

Start by creating a new project using create-svelte-app:

Terminal window
npm create svelte@latest my-skeleton-app
cd my-skeleton-app
npm install
npm run dev -- --open
2

Install Skeleton

Install the Skeleton core and Skeleton Svelte packages.

Terminal window
npm i -D @skeletonlabs/skeleton@next @skeletonlabs/skeleton-svelte@next
3

Install Tailwind

Install Tailwind using Svelte-Add to automate the process.

Terminal window
npx svelte-add@latest tailwindcss
npm install
4

Configure Tailwind

Open tailwind.config.js, then implement the highlighted snippets below.

import { join } from 'path';
import { skeleton } from '@skeletonlabs/skeleton';
import * as themes from "@skeletonlabs/skeleton/themes";
/** @type {import('tailwindcss').Config} \*/
export default {
content: [
'./src/**/_.{html,js,svelte,ts}',
join(require.resolve('@skeletonlabs/skeleton-svelte'), '../\*\*/_.{html,js,svelte,ts}')
],
theme: {
extend: {},
},
plugins: [
skeleton({
themes: [ themes.cerberus, themes.rose ]
})
]
}
5

Set Active Theme

Open app.html, then set the data-theme attribute on the body to define the active theme.

<body data-theme="cerberus">...</body>

Ready

You’re now ready to begin using Skeleton.