SvelteKit | Svelte | Theme swap light and dark mode

Consulting Ninja March 5, 2023
Video Thumbnail
Consulting Ninja Logo

Consulting Ninja

View Channel

About

I am here to help as MANY others as possible with web development, software development, and consulting related obstacles and issues. I love development, technology, consulting and want to build a positive community of developers (front, back , middle, scripts, everyone!) and tech lovers helping each other and building each other up to become better! I hope to see you soon! My channel membership is live now you can check that out here: https://www.youtube.com/channel/UCwPrPv9eS7Xgfp_wi7uxt0g/join I hope to see you in one of my live stream meet ups! * FYI * No StackOverflow behavior will be tolerated in my channel. Give positive advice and clear feedback without talking down to those that don't know please.

Video Description

This is another great video! In this video I show how to take a simple application and create light and dark mode swapping. I first show how to do this using a svelte store. I show the downside which is lost choice on refresh. After I show how to use a store I show how to use a service worker to swap the theme AND remember it for later. So we don't lose it on refresh! I hope you find this helpful! My channel membership is live check it out here!: https://www.youtube.com/channel/UCwPrPv9eS7Xgfp_wi7uxt0g/join Membership perk video: https://youtu.be/FJgKifAThdU Source code available here: https://github.com/consultingninja/lightDarkMode Service Worker Video: https://youtu.be/kVBJKSU7sw8 Need help? visit https://www.consultingninja.tech Check out my channel @ConsultingNinja for more videos like these. GoogleChrome Service Worker Doc: https://googlechrome.github.io/samples/service-worker/basic/ SvelteKit Service Worker Docs: https://kit.svelte.dev/docs/service-workers SvelteKit Sandbox: https://learn.svelte.dev/tutorial/welcome-to-svelte

You May Also Like

Master Web Development Today

AI-recommended products based on this video

Loading...
LEGO Speed Champions Ford Mustang Dark Horse Sports Car Toy, Buildable Ford Mustang Toy for Kids, Blue Toy Car Model Set, Gift Idea for Boys and Girls Aged 9 Years Old and Up, 76920

LEGO Speed Champions Ford Mustang Dark Horse Sports Car Toy, Buildable Ford Mustang Toy for Kids, Blue Toy Car Model Set, Gift Idea for Boys and Girls Aged 9 Years Old and Up, 76920

(1,175)
$29.82
FREE delivery Sat, Jun 14 on your first order
300+ bought in past month
Loading...
Growell Large Hydroponics Growing System Kit, 90 Pods Vertical Hydroponic Garden with 2 Light Modes Grow Light, Auto Circulating Water System, 40L Indoor Gardening System for Herb Vegetable Fruit

Growell Large Hydroponics Growing System Kit, 90 Pods Vertical Hydroponic Garden with 2 Light Modes Grow Light, Auto Circulating Water System, 40L Indoor Gardening System for Herb Vegetable Fruit

(5)
$799.99
PrimeFREE delivery Sat, Jun 14
Loading...
Hydroponics Growing System, Growell 16 Pods Indoor Garden with 28W Full Spectrum LED Grow Light, Auto Timer, 3 Smart Light Modes, 8L Large Herb Garden, Ideal Gardening Gift for Women, Men (Black)

Hydroponics Growing System, Growell 16 Pods Indoor Garden with 28W Full Spectrum LED Grow Light, Auto Timer, 3 Smart Light Modes, 8L Large Herb Garden, Ideal Gardening Gift for Women, Men (Black)

(253)
$129.99
PrimeFREE delivery Sat, Jun 14
Loading...
LED Desk Lamp with Dual Heads, Height Adjustable, USB Charging Port, 5 Light Modes & Dimmable Brightness, Bedside Lamp for Reading, Crafting, Work, Study (White, 15W)

LED Desk Lamp with Dual Heads, Height Adjustable, USB Charging Port, 5 Light Modes & Dimmable Brightness, Bedside Lamp for Reading, Crafting, Work, Study (White, 15W)

(3,090)
$20.99
FREE delivery Sat, Jun 14 on your first order
Loading...
Camping String Lights Outdoor, 6 in 1 Outdoor Waterproof Solar/USB Rechargeable Retractable Portable Stowable String Light with 8 Modes (42ft), Tent Lights for Camping, Hiking, Yard, RV (Multicolor)

Camping String Lights Outdoor, 6 in 1 Outdoor Waterproof Solar/USB Rechargeable Retractable Portable Stowable String Light with 8 Modes (42ft), Tent Lights for Camping, Hiking, Yard, RV (Multicolor)

(1,231)
$31.59$29.99
FREE delivery Sat, Jun 14 on your first order
50+ bought in past month
Loading...
Firefly Variety 8 Pack - Fire Starter Accessory for Swiss Army Victorinox Knives (Neon Green-Yellow Glow)

Firefly Variety 8 Pack - Fire Starter Accessory for Swiss Army Victorinox Knives (Neon Green-Yellow Glow)

(181)
$70.15$61.13
$5.05 delivery Thu, Jun 26Only 3 left in stock.
Loading...
9-in-1 5000A 150PSI Car Battery Booster Jump Starter with Air Compressor (All Gas/9L Diesel), Portable Car Battery Booster Pack, Safe Durable Car Jump Starter with Extended Jumper Cables, Glove, Light

9-in-1 5000A 150PSI Car Battery Booster Jump Starter with Air Compressor (All Gas/9L Diesel), Portable Car Battery Booster Pack, Safe Durable Car Jump Starter with Extended Jumper Cables, Glove, Light

(261)
$99.99
FREE delivery Sat, Sep 20
1K+ bought in past month