Content Field Types

Fields are the building blocks of every model in SleekCMS. When you add a field to a page model, entry model, or block model, you're defining a single piece of structured data — a title, an image, a date, a layout choice. The fields you choose determine what editors fill in, how content is validated, and what shape your API responses take.

This page covers every field type available in SleekCMS, organized by category. Each field type includes what it stores, how editors interact with it, and how it appears in the content API.


Field Type Reference

Field Category Stores Multiple Notes
Text Textual String or string array Yes Single line or textarea. Regex, min/max validation.
Number Textual Number No Numeric input.
Markdown Textual HTML string or array Yes Rendered to HTML in API response.
Rich Text Textual HTML string or array Yes Visual editor with formatting controls.
Boolean Textual Boolean No Toggle switch.
Dropdown Choice String No Backed by an option set.
Color Choice String No Color picker.
Date Temporal String (YYYY-MM-DD) No Date picker.
Date Time Temporal String (ISO 8601) No Date and time picker.
Image Media Object or object array Yes Gallery, upload, Unsplash, Pexels, Iconify, Pixabay, or URL.
Video Media String No External video URL.
JSON Data Object or array No Raw JSON editor.
Code Data String No Syntax-highlighted code editor.
Location Data Object or object array Yes Coordinates with static Google Map link.
Data Table Data Table structure No Freeform or fixed columns/rows.
Reference Relational Object or object array Yes Links to entry records. Full object in API.
Link Relational Object No Page path or external URL. Resilient to path changes.
Block Structural Object No Single block instance from a block model.
Dynamic Blocks Structural Array of objects Composable stack of block instances.
Group Structural Object No Organizational container for fields.
Collection Structural Array of objects Repeatable group of fields.

Textual Fields

Textual fields store written content — from a single-line title to a full rich text article body.

Text

A text field stores a string value. It can be configured as a single-line input or a multiline textarea, depending on whether the content is a short label or a longer passage like a description or excerpt.

Text fields support validation rules: regular expression patterns for format enforcement, minimum and maximum character counts, and minimum and maximum word counts. A "Phone Number" text field might use a regex pattern to ensure consistent formatting. A "Meta Description" field might enforce a maximum of 160 characters.

When configured as multiple, the field accepts more than one value and returns an array of strings in the API. This is useful for tags, keywords, or any field where editors need to provide a variable number of short text values.

Number

A number field stores a numeric value. Use it for quantities, prices, sort orders, ratings, durations, or any content that is inherently numerical.

Markdown

A markdown field provides a text editor where content is written in Markdown syntax. The API returns the content rendered as HTML, so your frontend receives ready-to-display markup without needing a Markdown parser on the client.

When configured as multiple, the field returns an array of HTML strings. This is useful when a model needs several independent Markdown content sections — for example, multiple answer fields on an FAQ entry.

Rich Text

A rich text field provides a visual formatting toolbar — bold, italic, links, lists, headings — similar to a word processor. Editors work with formatted text directly rather than writing markup.

When configured as multiple, the field returns an array of HTML strings. Like Markdown, this supports models that need several independent formatted content areas.

Boolean

A boolean field stores a true/false value, presented to editors as a toggle switch. Use it for visibility flags, feature toggles, or any binary choice — "Show author bio", "Pin to top", "Enable comments".


Choice Fields

Choice fields let editors select from predefined options rather than entering free-form values.

Dropdown

A dropdown field presents a list of choices from a connected option set. Editors select one value, and the selected option's value (not its label) is stored in the content record.

Dropdowns are the primary consumer of option sets. A "Layout" dropdown connected to a layout option set might offer "grid", "list", and "carousel". A "Theme" dropdown might offer "light", "dark", and "brand".

Option Sets and Lists

Color

A color field provides a color picker interface and stores the selected color as a string value. Use it for background colors, accent colors, text colors, or any field where editors need to choose a specific color.


Temporal Fields

Temporal fields store dates and times.

Date

A date field provides a date picker and stores the value in YYYY-MM-DD format. Use it for publish dates, event dates, deadlines, or any field that represents a calendar day without a specific time.

Date Time

A date time field provides both a date and time picker and stores the value in ISO 8601 format. Use it for event start times, scheduled publish times, or any field where the specific time of day matters.


Media Fields

Media fields handle images, video, and other visual content.

Image

An image field stores an image reference with metadata. Editors can select images from multiple sources: the site's media gallery, local file upload, Unsplash, Pexels, Iconify, Pixabay, or by providing a direct URL.

When configured as multiple, the field accepts several images and returns an array of image objects. This is useful for photo galleries, product image carousels, or any field that needs more than one image.

Video

A video field stores an external video URL — typically a YouTube, Vimeo, or other hosted video link. It does not handle direct video uploads. Use it for embedded video content, video backgrounds, or any field that references a hosted video.


Data Fields

Data fields store structured or specialized data that doesn't fit the textual or media categories.

JSON

A JSON field provides a raw JSON editor for storing arbitrary structured data. Use it for configuration objects, structured metadata, or any data that doesn't map cleanly to other field types. The API returns the stored JSON as a parsed object or array.

Code

A code field provides a syntax-highlighted code editor. Use it for embedding code snippets, storing template fragments, or any field where the content is source code. The API returns the code as a string.

Location

A location field stores geographic coordinates. The API response includes the coordinates along with a link to a static Google Map image, whose parameters (size, zoom, style) are customizable.

When configured as multiple, the field accepts several locations and returns an array of location objects. This is useful for store locators, event venues, or any content with multiple geographic points.

Data Table

A data table field provides a spreadsheet-like editing interface for tabular content. It can be configured in three modes:

Freeform — Editors control both the columns and rows. They can add, remove, and rename columns and add as many rows as needed. Use this when the table structure varies per content instance.

Fixed columns — You define the column headers in the model, and editors add rows of data. Use this when every instance should have the same columns but a variable number of rows — a pricing comparison, a specification list, a schedule.

Fixed columns and rows — You define both the columns and the rows in the model, and editors fill in the cell values. Use this when the entire table structure is predetermined — a fixed comparison matrix or a standard form.


Relational Fields

Relational fields create connections between content — linking pages to entries, entries to other entries, or content to navigation paths.

Reference

A reference field links to one or more records from an entry collection. When an editor adds a reference field to a model, they configure which entry model it references. In the editor, they select from a dropdown of available entries from that collection.

A one-to-one reference links to a single entry. The API returns the full entry object inline — all of the referenced entry's fields are embedded in the response, so your frontend has immediate access without a separate API call.

A one-to-many reference links to multiple entries. The API returns an array of full entry objects. Use this for categories, tags, related items, contributors, or any relationship where one piece of content connects to several entries.

Entry Models

Link

A link field stores a navigation reference — either a path to a page within your site or an external URL. Editors can select from existing page paths or enter an arbitrary URL for external links.

Page path links are resilient to path changes. If you update a page model's path from /about to /about-us, any link field that references that page automatically reflects the new path. This prevents broken internal links when restructuring your site's URL hierarchy.


Structural Fields

Structural fields organize other fields into groups, repeatable sets, and composable layouts. They don't store content themselves — they define how other fields are arranged.

Block

A block field embeds a single block instance from a specified block model. Unlike a dynamic block field where editors choose from multiple block types, a block field is tied to one block model and always renders that specific block.

Use block fields when a section of the page should always be a specific block type — a page model that always includes a hero block at the top, or an entry that always includes a metadata block.

Block Models

Dynamic Blocks

A dynamic block field is the composable layout mechanism in SleekCMS. It lets editors build a section of content by adding, removing, reordering, and hiding block instances from a set of allowed block types.

When configuring a dynamic block field, you control which blocks editors can choose from with three selection modes:

All blocks — Every block model in the site is available to editors. Use this for maximum flexibility, typically on general-purpose landing page models.

Blocks with prefix — Only block models whose handle starts with a specific prefix are available. This lets you organize blocks by convention — all blocks prefixed with blog- are available on blog post models, all blocks prefixed with landing- are available on landing pages. Adding a new block with the matching prefix automatically makes it available without reconfiguring the field.

Selected blocks — You explicitly choose which block models are available. This gives you the tightest control over what editors can add, and is the most common configuration for models where layout governance matters.

Block ModelsDynamic Blocks

Group

A group field is an organizational container that nests related fields together. Groups appear as collapsible sections in the editor, keeping the interface structured when a model has many fields.

A page model with SEO fields (meta title, meta description, Open Graph image) might group them under an "SEO" group. A block model with CTA fields (button label, button URL, button style) might group them under a "Button" group.

Groups affect the editor layout and the data nesting in the API response, but they're purely organizational — they don't create independent content that can be reused. Fields within a group can be regrouped or moved to a different group without losing existing content. The data stays intact; only the editorial organization changes.

Collection

A collection field is a repeatable group of fields — editors can add multiple items, each with the same set of sub-fields. Think of it as an inline list where each item has a structured shape.

Common uses include FAQ lists (question + answer pairs), feature lists (icon + title + description), timeline entries (date + event + description), and any content where editors need a variable number of structured items.

Collections are similar to blocks in that they produce arrays of structured objects, but they differ in important ways. Collections are defined inline within the model — their field structure is specific to that model and can't be reused elsewhere. Blocks are defined as separate models and can be shared across many page and entry models. If you need the same repeating structure in multiple models, use a block. If the structure is specific to one model, a collection keeps things simple.


What's Next

  • Group Fields — Deep dive into organizing fields with groups and column layouts.
  • Collection Fields — Repeatable inline structures and when to use them vs blocks.
  • Block Fields — Using single block and dynamic block fields in your models.
  • Dynamic Blocks — Configuring allowed blocks, the editor experience, and layout governance.
  • Option Sets — Defining the key-value pairs that power dropdown fields.
  • Page Models — How fields combine to define routable page content.
  • Entry Models — How fields combine to define reusable structured data.