# Vite + React Install and configure Skeleton for Vite + React. ## Requirements | Tooling | Minimum Supported | | ------------------------------------ | ----------------- | | [Vite](https://vite.dev/) | 6 | | [React](https://react.dev/) | 18 | | [Tailwind](https://tailwindcss.com/) | 4 | ## Installation ### Create a Project Start by creating a new [Vite](https://vite.dev/guide/#scaffolding-your-first-vite-project) project. This will install React and Typescript. ```console npm create vite@latest - Set your project named as desired - Set React as the framework - Set Typescript as the variant cd {yourProjectName} npm install ``` ### Install Skeleton Install the Skeleton core and React component packages. ```console npm i -D @skeletonlabs/skeleton @skeletonlabs/skeleton-react ``` ### Install Tailwind Install Tailwind and and the Tailwind Vite plugin. ```console npm install tailwindcss @tailwindcss/vite ``` Implement the plugin in `vite.config` in the root of your project. ```ts title="vite.config" {3} "tailwindcss()" import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import tailwindcss from "@tailwindcss/vite"; export default defineConfig({ plugins: [ tailwindcss(), react() // <-- Must come after Tailwind ], }); ``` ### Configure Tailwind Open your global styleshset in `/src/index.css` and append the following at the top of the file. ```css title="index.css" @import 'tailwindcss'; @import '@skeletonlabs/skeleton'; @import '@skeletonlabs/skeleton-react'; @import '@skeletonlabs/skeleton/themes/cerberus'; ``` ### Set the Active Theme Open `index.html`, then set the `data-theme` attribute on the HTML tag to define the active theme. ```html title="index.html" "data-theme="cerberus"" ... ``` ### Done Start the dev server using the following command. ```console npm run dev ```