├── src
├── routes
│ ├── +layout.ts
│ ├── +layout.svelte
│ └── +page.svelte
├── lib
│ ├── CodeBlock
│ │ ├── index.ts
│ │ ├── CodeBlock.svelte
│ │ └── Copy.svelte
│ ├── usage-code.svelte
│ ├── RichContent.svelte
│ ├── Examples.svelte
│ ├── ChangePositionExamples.svelte
│ └── examples.ts
├── svelte-hot-french-toast
│ ├── components
│ │ ├── icons
│ │ │ ├── index.ts
│ │ │ ├── IconLoading.svelte
│ │ │ ├── IconSuccess.svelte
│ │ │ ├── IconError.svelte
│ │ │ ├── IconInfo.svelte
│ │ │ └── IconWarning.svelte
│ │ ├── ToastMessage.svelte
│ │ ├── Toaster.svelte
│ │ ├── ToastIcon.svelte
│ │ ├── ToastWrapper.svelte
│ │ └── ToastBar.svelte
│ ├── core
│ │ ├── utils.ts
│ │ ├── useToaster.svelte.ts
│ │ ├── types.ts
│ │ ├── toast.ts
│ │ └── state.svelte.ts
│ └── index.ts
├── app.css
└── app.html
├── .npmrc
├── pnpm-workspace.yaml
├── header-image.png
├── static
├── favicon.png
├── og-image.png
└── fonts
│ ├── jost-latin-wght-normal.woff2
│ └── jetbrains-mono-latin-wght-normal.woff2
├── .gitignore
├── README-DEV.md
├── vite.config.js
├── tsconfig.json
├── svelte.config.js
├── prettier.config.js
├── eslint.config.js
├── LICENSE
├── CHANGELOG.md
├── README.md
└── package.json
/src/routes/+layout.ts:
--------------------------------------------------------------------------------
1 | export const prerender = true
2 |
--------------------------------------------------------------------------------
/src/lib/CodeBlock/index.ts:
--------------------------------------------------------------------------------
1 | export { default as CodeBlock } from "./CodeBlock.svelte"
2 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
2 | package-lock=false
3 | prefer-offline=true
4 | save-exact=true
5 |
--------------------------------------------------------------------------------
/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | onlyBuiltDependencies:
2 | - "@tailwindcss/oxide"
3 | - esbuild
4 |
--------------------------------------------------------------------------------
/header-image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/babakfp/svelte-hot-french-toast/HEAD/header-image.png
--------------------------------------------------------------------------------
/static/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/babakfp/svelte-hot-french-toast/HEAD/static/favicon.png
--------------------------------------------------------------------------------
/static/og-image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/babakfp/svelte-hot-french-toast/HEAD/static/og-image.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | /node_modules/
3 | /.svelte-kit/
4 | /dist/
5 | /build/
6 | /vite.config.*.timestamp-*
7 |
--------------------------------------------------------------------------------
/static/fonts/jost-latin-wght-normal.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/babakfp/svelte-hot-french-toast/HEAD/static/fonts/jost-latin-wght-normal.woff2
--------------------------------------------------------------------------------
/static/fonts/jetbrains-mono-latin-wght-normal.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/babakfp/svelte-hot-french-toast/HEAD/static/fonts/jetbrains-mono-latin-wght-normal.woff2
--------------------------------------------------------------------------------
/README-DEV.md:
--------------------------------------------------------------------------------
1 | Up to date with [Svelte French Toast](https://github.com/kbrgl/svelte-french-toast) until Jun 26, 2025 commit. SHA: `ac3a4dfb03735b62cf08615da48f93cb7a80647a`.
2 |
--------------------------------------------------------------------------------
/vite.config.js:
--------------------------------------------------------------------------------
1 | import { sveltekit } from "@sveltejs/kit/vite"
2 | import tailwindcss from "@tailwindcss/vite"
3 | import { defineConfig } from "vite"
4 |
5 | export default defineConfig({
6 | plugins: [tailwindcss(), sveltekit()],
7 | })
8 |
--------------------------------------------------------------------------------
/src/lib/usage-code.svelte:
--------------------------------------------------------------------------------
1 |
8 |
9 |
Loading...
12 | {:then html} 13 |{error}
19 | {/await} 20 | -------------------------------------------------------------------------------- /src/svelte-hot-french-toast/core/utils.ts: -------------------------------------------------------------------------------- 1 | export const genId = (() => { 2 | let count = 0 3 | 4 | return () => { 5 | count += 1 6 | return count.toString() 7 | } 8 | })() 9 | 10 | export const prefersReducedMotion = (() => { 11 | // Cache result 12 | let shouldReduceMotion: boolean | undefined 13 | 14 | return () => { 15 | if (shouldReduceMotion === undefined && typeof window !== "undefined") { 16 | const mediaQuery = matchMedia("(prefers-reduced-motion: reduce)") 17 | shouldReduceMotion = !mediaQuery || mediaQuery.matches 18 | } 19 | return shouldReduceMotion 20 | } 21 | })() 22 | -------------------------------------------------------------------------------- /prettier.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import("prettier").Config & import("prettier-plugin-svelte").PluginConfig & import("@ianvs/prettier-plugin-sort-imports").PluginConfig} */ 2 | export default { 3 | semi: false, 4 | tabWidth: 4, 5 | htmlWhitespaceSensitivity: "ignore", 6 | experimentalTernaries: true, 7 | experimentalOperatorPosition: "start", 8 | plugins: [ 9 | "prettier-plugin-svelte", 10 | "@ianvs/prettier-plugin-sort-imports", 11 | "prettier-plugin-tailwindcss", 12 | ], 13 | importOrder: [ 14 | "^@", 15 | "
2 |
3 | # Svelte Hot French Toast
4 |
5 | Buttery smooth toast notifications for Svelte 5. Lightweight, customizable, and beautiful by default.
6 |
7 | - [Demo](https://svelte-hot-french-toast.vercel.app)
8 | - [CHANGELOG](https://github.com/babakfp/svelte-hot-french-toast/blob/main/CHANGELOG.md)
9 | - [NPM](https://www.npmjs.com/package/svelte-hot-french-toast)
10 | - [GitHub](https://github.com/babakfp/svelte-hot-french-toast)
11 |
12 | > [!IMPORTANT]
13 | > This is only compatible with Svelte 5. If you're using Svelte 4, please use a compatible version of [Svelte French Toast](https://github.com/kbrgl/svelte-french-toast).
14 |
15 | ## Installation
16 |
17 | ```bash
18 | pnpm add -D svelte-hot-french-toast
19 | ```
20 |
21 | ## Usage
22 |
23 | ```svelte
24 |
31 |
32 | 52 | Lightweight, customizable, and beautiful by default. 53 |
54 |{feature}
76 |