In this video we will be learning how to add a theme toggle to our Sveltekit website which used cookies for persistence and also server side rendered!
00:00 Intro to dark mode toggle
02:35 A simple dark mode switcher
05:47 Set a cookie to save current theme (color scheme)
10:28 Adding hooks.server.js with handle function
15:28 Outro
In this SvelteKit 1.0 Walkthrough series we will be learning Sveltekit by doing a small project.
We will be creating a website similar to this one - https://business-frontpage.webjeda.com
Hosted site: https://sveltekit-walkthrough-website...
Documentation: https://kit.svelte.dev/docs/hooks#ser...
The code for the completed project is here - https://github.com/sharu725/sveltekit...
🐦 Follow me - / @webjeda
🌐 Visit my website - https://blog.webjeda.com
#sveltekit #layout #darkmode #theme #cookie