---
title: "SvelteKit Flags SDK Starter"
description: "A SvelteKit app using the @vercel/flags Flags SDK."
url: "https://vercel.com/templates/svelte/toolbar-feature-flags-sveltekit"
links:
  repository: "https://github.com/vercel/examples/tree/main/toolbar/toolbar-feature-flags-sveltekit"
  demo: "https://toolbar-feature-flags-sveltekit.vercel.app/"
  deploy: "https://vercel.com/new/clone?demo-title=SvelteKit+Flags+SDK+Starter&demo-description=A+SvelteKit+app+using+the+%40vercel%2Fflags+Flags+SDK.&demo-url=https%3A%2F%2Ftoolbar-feature-flags-sveltekit.vercel.app%2F&project-name=toolbar-feature-flags-sveltekit&repository-name=toolbar-feature-flags-sveltekit&repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Ftoolbar%2Ftoolbar-feature-flags-sveltekit&env=FLAGS_SECRET&demo-image=%2F%2Fimages.ctfassets.net%2Fe5382hct74si%2F7h9xa2tJ1lhTmiKlL57vB%2F75960651298c3ce0a81c7472b7be6669%2Ftoolbar-feature-flags-sveltekit.vercel.app___3_.png"
---

# SvelteKit Flags SDK Starter

A SvelteKit app using the @vercel/flags Flags SDK.

# Vercel Toolbar Flags SvelteKit Starter

Simple SvelteKit template that uses the [Vercel Toolbar](https://vercel.com/docs/workflow-collaboration/vercel-toolbar) and [Feature Flags](https://vercel.com/docs/workflow-collaboration/feature-flags).

## Demo

https://toolbar-feature-flags-sveltekit.vercel.app/

## How to Use

You can choose from one of the following two methods to use this repository:

### One-Click Deploy

Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=vercel-examples)

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/toolbar/toolbar-feature-flags-sveltekit&project-name=toolbar-feature-flags-sveltekit&repository-name=toolbar-feature-flags-sveltekit&env=FLAGS_SECRET)

### Clone and Deploy

Execute the following command to download the example into the `my-project` folder:

```bash
npx degit@latest https://github.com/vercel/examples/toolbar/toolbar-feature-flags-sveltekit my-project
```

After installing the dependencies using `pnpm install`, create a new project in your Vercel Dashboard. In your project's settings, create an environment variable called `FLAGS_SECRET`. The value must have a specific length (32 random bytes encoded in base64) to work as an encryption key. You can create one using node:

```bash
node -e "console.log(crypto.randomBytes(32).toString('base64url'))"
```

In your local environment, connect to your created project using `vercel link` and then pull your environment variables with `vercel env pull`.

Next, run SvelteKit in development mode:

```bash
pnpm dev
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=vercel-examples) ([Documentation](https://vercel.com/docs/frameworks/sveltekit)).

## Related Templates

### [SvelteKit Boilerplate](https://vercel.com/templates/svelte/sveltekit-boilerplate)

A SvelteKit app including nested routes, layouts, and page endpoints.

---

## Additional documentation

The [Vercel Knowledge Base](https://vercel.com/kb) contains guides and answers to common questions about Vercel, including deployment, framework configuration, domains, caching, and troubleshooting.
