Quaff is a Material Design 3 framework built for Svelte 5. It includes ready-to-use components, layouts, and utilities for building Svelte apps.
Documentation · Components · npm
npm create quaff@latestNote
Quaff is in beta while we prepare 1.0.0-rc1. Most of the framework is in place, but some
APIs may still change before 1.0.
- Material Design 3 components, layouts, and themes
- Built for Svelte 5 runes and SvelteKit
- Fully typed component APIs
- Easy setup, auto-imports, and component tree shaking through
create-quaff
create-quaff creates a new SvelteKit project with Quaff configured. Once it finishes, open the generated project and start building your app.
Browse the documentation for components, layouts, and utilities.
quaffAssets() includes styles for used components and can remove unused CSS selectors and
Material Symbols icons. Font options select Roboto weights, Unicode subsets, and file formats.
Removing unused selectors and icons is opt-in. See Asset optimization for setup, defaults, and runtime safelists.
To work on the framework itself, install its dependencies and start the dev server:
bun install
bun run devCommon commands:
bun run openstarts the development server and opens it in a browserbun run checkruns Svelte and TypeScript diagnosticsbun run lintchecks formatting and lint rulesbun run packagebuilds and validates the publishable Svelte packagebun run buildbuilds the package and its CSS bundlesbun run build:docsgenerates and builds the documentation site
Tests are grouped by file suffix, and each group runs on its own:
bun run test:unitruns*.test.tslogic testsbun run test:ssrruns*.ssr.test.tsserver rendering testsbun run test:buildruns*.build.test.tstests that build Vite, SvelteKit or docgen fixturesbun run test:browserruns*.browser.test.tstests in Chromiumbun run testruns every group
Add --run to run once without watching. Install Chromium once before running browser tests:
bunx playwright install chromium --only-shell
bun run test:browser --runTo use an installed Google Chrome instead, set QUAFF_BROWSER_CHANNEL=chrome. CI uses Playwright's pinned Chromium, so exact geometry can differ slightly.
src/lib/componentscontains the public UI componentssrc/lib/csscontains component styles, themes, and layout utilitiessrc/routescontains the documentation and component examplespluginscontains the build-time preprocessorssrc/lib/plugins/assetscontains the Vite asset plugin's source scan, CSS selection, and fontsdocgenandscriptscontain documentation and build tooling
Quaff began with code and ideas from several open-source projects and still maintains some compatible APIs. Most of that code has since been replaced with Quaff's own implementation:
- Quasar Framework: Copyright (c) 2015-present Razvan Stoenescu. Licensed under the MIT License
- Material Web: Copyright (c) Google LLC. Licensed under the Apache License 2.0
- BeerCSS: Copyright (c) 2021 Beer css! Licensed under the MIT License
Quaff is independent and is not endorsed by or affiliated with Google, Material Design, or the projects listed.
Quaff is available under the MIT License.