# Configuring fields for content-types

The Content-type Builder is only accessible to create and update content-types when your Strapi application is in a development environment, else it will be in a read-only mode in other environments.


Content-types are composed of one or several fields. Each field is designed to contain specific kind of data, filled up in the Content Manager (see Writing content).

In the Content-type Builder, fields can be added at the creation of a new content-type or component, or afterward when a content-type or component is edited or updated. The following documentation lists all existing regular fields but also tackles the specificities of custom fields, components, and dynamic zones. For each, you will find a definition, explanation of the form they take once in the Content Manager, and instructions to configure them.

✏️ NOTE

Depending on which content-type or component is being created or edited, not all fields — including components and dynamic zones — are always available.

Field selection

# Regular fields

Regular fields are Strapi's default, built-in types of fields. Regular fields are listed in the Default tab when selecting a field for a content-type.

# Text

The Text field displays a textbox that can contain small text. This field can be used for titles, descriptions, etc.

# Rich Text

The Rich Text field displays an editor with formatting options to manage rich text. This field can be used for long written content.

# Number

The Number field displays a field for any kind of number: integer, decimal and float.

# Date

The Date field can display a date (year, month, day), time (hour, minute, second) or datetime (year, month, day, hour, minute, and second) picker.

# Boolean

The Boolean field displays a toggle button to manage boolean values (e.g. Yes or No, 1 or 0, True or False).

# Relation

The Relation field allows to establish a relation with another content-type, that must be a collection type.

There are 6 different types of relations:

  • One way: Content-type A has one Content-type B
  • One-to-one: Content-type A has and belong to one Content-type B
  • One-to-many: Content-type A belongs to many Content-type B
  • Many-to-one: Content-type B has many Content-type A
  • Many-to-many: Content-type A has and belongs to many Content-type B
  • Many way: Content-type A has many Content-type B

# Email

The Email field displays an email address field with format validation to ensure the email address is valid.

# Password

The Password field displays a password field that is encrypted.

# Enumeration

The Enumeration field allows to configure a list of values displayed in a drop-down list.

✋ CAUTION

Since Strapi v4.1.3, enumeration values should always have an alphabetical character preceding any number as it could otherwise cause the server to crash without notice when the GraphQL plugin is installed.

# Media

The Media field allows to choose one or more media files (e.g. image, video) from those uploaded in the Media Library of the application.

# JSON

The JSON field allows to configure data in a JSON format, to store JSON objects or arrays.

# UID

The UID field displays a field that sets a unique identifier, optionally based on an existing other field from the same content-type.

# Custom fields

Custom fields are a way to extend Strapi’s capabilities by adding new types of fields to content-types or components. Once installed (see Marketplace documentation), custom fields are listed in the Custom tab when selecting a field for a content-type.

Each custom field type can have basic and advanced settings. The Marketplace (opens new window) lists available custom fields, and hosts dedicated documentation for each custom field, including specific settings.

# Components

Components are a combination of several fields. Components allow to create reusable sets of fields, that can be quickly added to content-types, dynamic zones but also nested into other components.

When configuring a component through the Content-type Builder, it is possible to either:

  • create a new component by clicking on Create a new component (see Creating a new component),
  • or use an existing one by clicking on Use an existing component.

# Dynamic zones

Dynamic zones are a combination of components that can be added to content-types. They allow a flexible content structure as once in the Content Manager, administrators have the choice of composing and rearranging the components of the dynamic zone how they want.

After configuring the settings of the dynamic zone, its components must be configured as well. It is possible to either choose an existing component or create a new one.

✋ CAUTION

When using dynamic zones, different components cannot have the same field name with different types (or with enumeration fields, different values).