# Create a theme (https://docs.salla.dev/twilight/react/local-development/create-a-theme)



Run `salla theme create` once, when you start a new theme. Run it in the folder where the new theme folder should appear.

```bash
salla theme create
```

Alias: `salla theme c`.

## The questions [#the-questions]

1. **Theme type.** Choose the React theme (the default). The other choice is the legacy Twig theme, which this documentation does not cover.
2. **Name.** 3 to 50 characters. The folder is the name as a slug: `My Store` becomes `./my-store`.
3. **Store.** The demo store (ready now, no login) or your own demo store (asks you to sign in). You can change it later, see [Link a store](https://docs.salla.dev/twilight/react/local-development/link-a-store).

## Skip the questions [#skip-the-questions]

```bash
salla theme create --type react --name "My Store" --yes
```

| Option                | Meaning                                                                   |
| --------------------- | ------------------------------------------------------------------------- |
| `-t, --type <type>`   | `react` for a Twilight theme.                                             |
| `-n, --name <name>`   | The theme name.                                                           |
| `-s, --store <store>` | Bind this store id and skip the store question.                           |
| `-y, --yes`           | Accept the defaults: React theme, demo store, no prompts, no GitHub step. |

## What it does [#what-it-does]

### Checks the toolchain [#checks-the-toolchain]

The same checks as [`salla theme doctor`](https://docs.salla.dev/twilight/react/local-development/prerequisites). Nothing is written yet, so a failure here costs nothing.

### Downloads the starter [#downloads-the-starter]

It fetches the published `@salla.sa/theme-raed` package (Salla's Raed theme) into the new folder. You start from a complete storefront, not an empty project. The command stops if the folder already exists.

### Makes it yours [#makes-it-yours]

It renames the starter: `name` in `package.json` (and removes `"private"`), the `name` in `twilight.json` (Arabic and English), the name in the server config file, and the title of `README.md`.

### Binds a store [#binds-a-store]

It writes `.env` with the store you picked. See [Link a store](https://docs.salla.dev/twilight/react/local-development/link-a-store).

### Starts git [#starts-git]

`git init`, then an "Initial commit". If git has no identity configured the theme is still created, only without that commit.

### Installs dependencies [#installs-dependencies]

`pnpm install`. If this fails the folder is kept: run `pnpm install` inside it.

### Offers a GitHub repository [#offers-a-github-repository]

Interactive mode only (no `--yes`). If you are signed in and have a linked GitHub installation with full access, it creates a **private** repository and pushes the first commit to its default branch. Any failure only prints a warning and your local theme keeps working.

You need this repository to [publish](https://docs.salla.dev/twilight/react/local-development/publish) later. You can skip it now.

### Starts the dev server [#starts-the-dev-server]

It hands over to `salla theme dev` and opens the storefront.

## Use a different starter [#use-a-different-starter]

To test an unpublished starter, set `SALLA_THEME_TEMPLATE` to a local `.tgz` file or a folder before running `create`. Most themes never need this.

Next: [Run it locally](https://docs.salla.dev/twilight/react/local-development/run-locally)
