Skip to content
quaffuiPublic

About

No description, website, or topics provided.

Resources

Stars

61 stars

Watchers

2 watching

Forks

Repository files navigation

Quaff

Quaff cocktail logo

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@latest

Note

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.

Included

  • 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

Getting Started

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.

Asset optimization

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.

Contributing to Quaff

To work on the framework itself, install its dependencies and start the dev server:

bun install
bun run dev

Common commands:

  • bun run open starts the development server and opens it in a browser
  • bun run check runs Svelte and TypeScript diagnostics
  • bun run lint checks formatting and lint rules
  • bun run package builds and validates the publishable Svelte package
  • bun run build builds the package and its CSS bundles
  • bun run build:docs generates and builds the documentation site

Tests are grouped by file suffix, and each group runs on its own:

  • bun run test:unit runs *.test.ts logic tests
  • bun run test:ssr runs *.ssr.test.ts server rendering tests
  • bun run test:build runs *.build.test.ts tests that build Vite, SvelteKit or docgen fixtures
  • bun run test:browser runs *.browser.test.ts tests in Chromium
  • bun run test runs 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 --run

To use an installed Google Chrome instead, set QUAFF_BROWSER_CHANNEL=chrome. CI uses Playwright's pinned Chromium, so exact geometry can differ slightly.

Repository Layout

  • src/lib/components contains the public UI components
  • src/lib/css contains component styles, themes, and layout utilities
  • src/routes contains the documentation and component examples
  • plugins contains the build-time preprocessors
  • src/lib/plugins/assets contains the Vite asset plugin's source scan, CSS selection, and fonts
  • docgen and scripts contain documentation and build tooling

Acknowledgements

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:

Quaff is independent and is not endorsed by or affiliated with Google, Material Design, or the projects listed.

License

Quaff is available under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

61 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages