You can view a demo of this starter kit here.
This repository provides a starting point for projects using Svelte and TailwindCSS. You can either use this repository directly or follow the steps to create your own setup.
To use the repository directly, follow these steps:
Clone the repository:
git clone https://github.com/mdenesfe/svelte-tailwind-starter-kit.git
Navigate to the project directory:
cd svelte-tailwind-starter-kit
Install the dependencies:
npm install
Start the development server:
npm run dev
Open your browser and go to http://localhost:5173/.
If you prefer to set up your project step by step, follow these instructions:
Create a new Svelte project:
npm create svelte@latest svelte-tailwind-starter-kit
Navigate to the project directory:
cd svelte-tailwind-starter-kit
Install the dependencies:
npm install
Add TailwindCSS to your project:
npx svelte-add@latest tailwindcss
When prompted, respond to the question:
Do you want to use typography plugin?
Select Yes
.
Modify your svelte.config.js
file in the root directory as follows:
import adapter from '@sveltejs/adapter-auto';
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
adapter: adapter(),
alias: {
"@/*": "./path/to/lib/*",
},
}
};
export default config;
Install any additional dependencies:
npm install
Start the development server:
npm run dev
Open your browser and go to http://localhost:5173/.