Must Have SvelteKit Extension for VS Code - SvelteKit Snippets

SvelteKit is one of my favorite frameworks right now, and it just got a whole lot easier to work with inside of VS Code. The SvelteKit Snippets extension for VS Code is a must-have! Let’s take a quick look.

Overview

To use the snippet, you can search for it in the extensions tab of the sidebar inside of VS Code and click install.

After you get it installed, now you’ll have access to a load of different snippets that covers all of the essentials.

  • creating components
  • API endpoints
  • if conditions, for loops, etc
  • load functions

This basically gives you the building blocks for everything you need to work with SvelteKit. Here is a full list from the docs.

To trigger an extension, simply start typing its prefix. For example, if you want to generate a SvelteKit component, you’d start typing kitComp.

Notice, there’s even an option for TypeScript! Then, to complete the snippet, you can press enter and look at your wonderful new component.

Wrap Up

If you want to learn more about SvelteKit, make sure to check out our (Amy Dutton and I) upcoming SvelteKit course, Everything Svelte. We’ll cover everything you need to know about working with SvelteKit, Supabase, and much much more!