Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Svelte library template for building Flowbite-Svelte-Blocks components, powered by the sv CLI.

A full-stack Next.js TypeScript template focused on functionality over UI, featuring Zustand, TanStack Query, and ESLint 9 support.
Flowbite Svelte Blocks is a Svelte library template powered by the sv CLI that scaffolds a reusable component library with a built-in showcase app. This repository specifically targets Flowbite-Svelte-Blocks components, providing the standard SvelteKit library building blocks for developing, packaging, and publishing npm packages.
Flowbite Svelte Blocks is a boilerplate for creating Svelte component libraries, generated with the sv scaffolding tool. It splits the project into src/lib for library source code and src/routes for a preview or documentation app. The template uses SvelteKit's packaging feature to produce distributable component files, and the repository metadata identifies the intended output as Flowbite-Svelte-Blocks components.
npx sv create my-app using the official Svelte CLI.src/lib holds the reusable components; src/routes runs a preview app.npm run package builds the library from src/lib into a distributable format.npm run build creates a production version of the showcase app; npm run preview serves it locally.package.json, npm publish releases the library to npm.Flowbite Svelte Blocks is aimed at developers who want to build and distribute Svelte component libraries. It suits:
npx sv create and developing components in src/lib.npm run package, then publish using npm publish.npm run dev -- --open.The workflow starts with npx sv create from any directory. After installing dependencies with npm install, you run npm run dev to start a development server. The library code lives in src/lib, while src/routes provides a live preview. To distribute the library, run npm run package; to create a production version of the showcase, run npm run build and then npm run preview.
Run npx sv create my-app from your terminal to scaffold a new Svelte library in a folder named my-app. The command generates the same structure this template uses: src/lib for components and src/routes for a preview app.
Execute npm run package from the project root. This runs SvelteKit's packaging command, which compiles the contents of src/lib into a distributable format suitable for npm.
First, edit package.json to set the desired "name" and add a "license" field pointing to a LICENSE file (e.g., MIT). Then run npm publish from the project root to upload the package.
The showcase app in src/routes can be built with npm run build. To deploy it, you may need to install a SvelteKit adapter that matches your hosting environment, as noted in the template.
