What Is a Field?

In this article, you'll learn what Fields are and how to use them in your Custom Types.

Fields are the most elementary component of a Prismic Custom Type model. You use fields, along with Slices, to create your Custom Types. Each field is designed to hold different data types to cover all use cases.

Prismic has eighteen different field types.

Eight of those fields return a simple value in the API, like a Number (3) or a color ("#f3f3f3"). The other ten fields return a structured object in the API.

Refer to each field's documentation to learn more details about them all.

Simple fields

These are represented by simple primitive values, like numbers, booleans, strings.

In the API response, you can access them directly:

  uid: "example_document",
  // ...
  data: {
    example_date: "2020-12-10",
    example_timestamp: "2020-12-10T04:05:09+0000",
    example_color: "#c7ab5d",
    example_number: 74.5,
    example_key_text: "Example Key Text Value",
    example_select: "North",
    example_boolean: true,

Structured fields

In structured fields, the content is represented by a JSON object. These are the structured fields:

How to use fields

The Build mode in the Custom Type builder of your repository gives you total freedom to create, edit, remove and modify all of the fields you add to your Custom Types. This is made easy thanks to the drag and drop tool.

Whenever you add a new Field to your Custom type, a configuration window will pop so you can start customizing the Name, API ID, and Placeholder of the field and any particular configuration settings that each Field has.

Screenshot of a field in the drag-and-drop editor.

The JSON editor

The JSON editor tab in the Custom Type editor allows you to add advanced configurations for each field. These extra configuration options are usually not available in the visual builder of a field's configuration and can only be added manually.

You can learn more about the JSON configurations in the dedicated articles for each field.

Recommended articles

Was this article helpful?
Not really
Yes, Thanks

Can't find what you're looking for? Spot an error in the documentation? Get in touch with us on our Community Forum or using the feedback form above.