SvelteKit TypeScript TailwindCSS & Sass Starter

A modern starter template for building web applications with SvelteKit, TypeScript, TailwindCSS, and Sass. This template provides a robust foundation for your next project with best practices and modern tooling.

โœจ Why Choose This Starter?

  • ๐Ÿš€ Modern Stack: Built with the latest versions of SvelteKit, TypeScript, and TailwindCSS
  • ๐ŸŽจ Styling Flexibility: Combine TailwindCSS utilities with Sass for powerful styling
  • ๐Ÿงช Testing Ready: Includes both E2E and unit testing setup out of the box
  • ๐Ÿ“ Code Quality: Pre-configured with ESLint, Prettier, and TypeScript
  • ๐Ÿ”„ Git Hooks: Husky and lint-staged ensure code quality on every commit
  • ๐Ÿ“ฑ Responsive: Built with mobile-first design principles
  • โšก๏ธ Performance: Optimized for fast loading and smooth interactions

๐Ÿš€ Features

  • โšก๏ธ SvelteKit - The official application framework for Svelte
  • ๐ŸŽจ TailwindCSS v4 - A utility-first CSS framework
  • ๐Ÿ“˜ TypeScript - Type-safe JavaScript
  • ๐ŸŽจ Sass - CSS extension language
  • ๐Ÿงช Playwright - End-to-end testing
  • ๐Ÿงช Vitest - Unit testing
  • ๐Ÿ“ ESLint - Code linting
  • ๐Ÿฆ‹ Prettier - Code formatting
  • ๐Ÿถ Husky - Git hooks
  • ๐Ÿงน Lint Staged - Run linters on staged files

๐Ÿš€ Quick Start

๐Ÿ› ๏ธ Installation

# Clone the repository
git clone [email protected]:MikevPeeren/sveltekit-typescript-tailwindcss-sass-starter.git
# or
npx degit [email protected]:MikevPeeren/sveltekit-typescript-tailwindcss-sass-starter.git

# Install dependencies
yarn install
# or
npm install

๐Ÿš€ Development

Start the development server:

yarn dev
# or
npm run dev

Open http://localhost:3000 to view your application.

๐Ÿ“ Available Scripts

  • yarn dev - Start development server
  • yarn build - Build for production
  • yarn preview - Preview production build
  • yarn test - Run Playwright end-to-end tests
  • yarn test:unit - Run Vitest unit tests
  • yarn check - Type-check your code
  • yarn check:watch - Type-check your code in watch mode
  • yarn lint - Lint your code
  • yarn format - Format your code

๐Ÿ“ Project Structure

โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ routes/          # SvelteKit routes
โ”‚   โ”œโ”€โ”€ app.html         # HTML template
โ”‚   โ”œโ”€โ”€ app.scss         # Global styles
โ”‚   โ””โ”€โ”€ app.d.ts         # TypeScript declarations
โ”œโ”€โ”€ static/              # Static assets
โ”œโ”€โ”€ tests/               # Test files
โ””โ”€โ”€ public/              # Public assets

๐Ÿงช Testing

This starter includes both end-to-end and unit testing setup:

  • End-to-end Testing: Uses Playwright for browser testing
  • Unit Testing: Uses Vitest for component and utility testing

Run tests with:

# Run end-to-end tests
yarn test

# Run unit tests
yarn test:unit

๐ŸŽจ Styling

This starter combines the power of TailwindCSS with Sass:

  • Use TailwindCSS utility classes directly in your components
  • Create custom styles with Sass in src/app.scss
  • Leverage TailwindCSS's responsive design utilities
  • Use Sass variables and mixins for complex styling needs

๐Ÿ”ง Configuration

The project includes several configuration files:

  • tailwind.config.js - TailwindCSS configuration
  • tsconfig.json - TypeScript configuration
  • svelte.config.js - SvelteKit configuration
  • .eslintrc.cjs - ESLint configuration
  • .prettierrc - Prettier configuration

๐Ÿ“š Learn More

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • SvelteKit team for the amazing framework
  • TailwindCSS team for the utility-first CSS framework
  • All contributors who have helped improve this starter

Top categories

svelte logo

Need a Svelte website built?

Hire a professional Svelte developer today.
Loading Svelte Themes