---
title: "Select"
description: "This article explains what the select field is and how to configure it."
meta_title: "Select"
category: "fields"
audience: developers
lastUpdated: "2026-04-23T01:17:46.000Z"
---

The select field allows content writers to choose an option from a list of text options.

Select field values can be used like a string in JavaScript.

**Next.js example:**

```tsx
<p>My favorite fruit: {slice.primary.favorite_fruit}</p>
```

**Nuxt example:**

```vue-html
<p>My favorite fruit: {{ slice.primary.favorite_fruit }}</p>
```

**SvelteKit example:**

```svelte
<p>My favorite fruit: {slice.primary.favorite_fruit}</p>
```

# Add a select field to a content model

Select fields are added using the [Type Builder](https://prismic.io/docs/type-builder.md), a tool for building by hand, or the [Prismic CLI](https://prismic.io/docs/cli.md), a tool for AI agents.

* **Type Builder:**

  > **Important**
  >
  > Type Builder is rolling out to new users. If you do not have access, use **Slice Machine**.

  1. **Watch for changes**

     In your local website project, start the Prismic CLI's `sync` command. The CLI will watch for changes in the Type Builder and pull them into your project.

     ```sh
     npx prismic sync --watch
     ```

     > **Tip**: You can pull Type Builder changes at any time using `npx prismic
     >   sync`.

  2. **Add a select field**

     In the Type Builder, navigate to the slice, page type, or custom type you want to modify. Add a **select** field and provide the following:

     * **Label**: The label shown to content writers in the [Page Builder](https://prismic.io/docs/guides/page-builder.md). Use an easily understandable name.
     * **API ID**: The property name in the Content API. Use a short, snake-cased name.
     * **Use first value as default**: Whether the first option is selected by default. If unchecked, content writers can leave the field empty.

  3. **Define options**

     Under the **Options** section, add as many options as needed.

     You can now close the Prismic CLI `sync` command or add your next field.

* **Prismic CLI:**

  > Your AI agent can perform these steps for you. See [Prismic with AI](https://prismic.io/docs/ai.md) for details.

  1. **Add a select field**

     Use the `prismic field add select` command with one `--option` flag per option.

     ```sh
     npx prismic field add select size --to-slice MySlice \
       --option Small \
       --option Medium \
       --option Large
     ```

     Use `--to-type` to add the field to a page type or custom type instead.

     ```sh
     npx prismic field add select size --to-type page \
       --option Small \
       --option Medium \
       --option Large
     ```

     Use `--default-value` to set the default selection.

     ```sh
     npx prismic field add select size --to-slice MySlice \
       --option Small \
       --option Medium \
       --option Large \
       --default-value Medium
     ```

* **Slice Machine:**

  1. **Open Slice Machine**

     In your Prismic project, start Slice Machine to begin editing content models.

     ```sh
     npx start-slicemachine --open
     ```

  2. **Add a select field**

     In Slice Machine, navigate to the slice, page type, or custom type you want to modify. Add a **select** field.

     The **label** determines the label shown to content writers in the [Page Builder](https://prismic.io/docs/guides/page-builder.md). Use an easily understandable name.

     The **API ID** determines the property name in the Content API. Use a short, snake-cased name.

     The **Use first value as default** setting determines if the first option is selected by default. If this option is not checked, content writers can leave the field empty.

  3. **Define options**

     Under the **Options** section, add as many options as needed.

# Use select fields

Select fields can be used like a string in JavaScript.

**Next.js example:**

```tsx
<p>My favorite fruit: {slice.primary.favorite_fruit}</p>
```

**Nuxt example:**

```vue-html
<p>My favorite fruit: {{ slice.primary.favorite_fruit }}</p>
```

**SvelteKit example:**

```svelte
<p>My favorite fruit: {slice.primary.favorite_fruit}</p>
```

# Check if a select field has a value

Use `isFilled.select()` from [`@prismicio/client`](https://prismic.io/docs/technical-reference/prismicio-client/v7.md) to check if a select field has a value.

```ts
import { isFilled } from "@prismicio/client";

if (isFilled.select(slice.primary.my_select_field)) {
  // Do something if `my_select_field` has a value.
}
```

[Learn more about `isFilled`](https://prismic.io/docs/technical-reference/prismicio-client/v7.md#isfilled)

# API response

Here is what a select field looks like from the Content API:

```json
{
  "example_select": "My selected value"
}
```
