An attempt to make Material 3 in Svelte. See the website for docs.
- Install the library into a Svelte project (
npm i m3-svelte
). - Use the theme page to construct a theme. Copy the usage, and paste it in
layout.svelte
(don't forget to import it first). - Set up your typography. By default, M3 Svelte uses Roboto, but you need to import it from
https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap
. You could also customize the font (see BaseStyles.svelte). - Set up your body to use the theme's background and text color, as well as its font. See M3 Svelte's app.html for an example.