Fields can be added to three places:
- Sites - Site-wide content (logo, navigation, footer, etc.)
- Page Types - Content each page stores, such as a title, author, or article body
- Blocks - Section-level content (headlines, images, descriptions, etc.)
Type names in files
Field definitions usename, label, type, and optional config. Use lowercase type IDs: text, rich-text, markdown, number, date, select, switch (Toggle), slider, image, icon, link, url, site-field, page-field, page, page-list, repeater, group, and info. Nested Group and Repeater fields use subfields.
Defaults belong in content.yaml, not a default or required property on the field. See file examples.
Text Fields
Text
Text
Text input that automatically grows to accommodate content.Use for:
- Headlines and titles
- Button labels
- Short descriptions
- Names
Rich Text
Rich Text
Rich text editor with formatting controls. It supplies HTML to your block.Use for:
- Article content
- Descriptions with formatting
- Long-form content
- Any text needing formatting
Markdown
Markdown
Markdown editor for formatted text.Use for:
- Documentation
- Blog posts
- README content
- Developer-friendly content
Number and date fields
Number
Number
Numeric input that stores a number. The implementation parses values with
parseFloat, so values are not restricted to integers.Use for:- Quantities
- Counts
- Whole number ratings
- Numeric values
Date
Date
Date picker that outputs dates in YYYY-MM-DD format.Use for:
- Publication dates
- Event dates
- Deadlines
- Any calendar dates
The Date input uses YYYY-MM-DD format (e.g., “2024-01-15”). Values are strings; resolved references or imported dates can include an ISO timestamp such as “2024-01-15T00:00:00Z”. Use JavaScript’s
new Date() constructor with an explicit UTC display time zone for date-only strings, which are parsed as UTC. Without that option, users west of UTC can see the previous day. Quote date values in YAML, such as publish_date: "2026-10-11", so parsers keep them as strings. A Date field does not schedule publication. Use the raw value for the datetime attribute in <time> elements.Selection Fields
Select
Select
Dropdown menu for selecting one option from a list.Use for:Options:Each option in a Select field has three properties:
- Categories
- Variants
- Status options
- Single-choice selections
- value: The actual value stored (used in your code)
- label: Display text shown to editors
- icon: Optional icon identifier (from Iconify)
Toggle
Toggle
Boolean toggle switch for on/off options.Use for:
- Feature toggles
- Boolean settings
- Show/hide options
- Enable/disable states
Slider
Slider
Slider for selecting numeric values.Use for:
- Opacity values
- Percentage selections
- Adjustable numeric settings
Media Fields
Image
Image
Image upload and selection field. Returns an object with Options (both optional):
url and alt properties.Use for:- Photos
- Graphics
- Custom icons
- Any visual content
- Max Size MB: Maximum file size in megabytes
- Max Width or Height: Maximum dimension (width or height) in pixels
Icon
Icon
Icon picker for selecting icons from Iconify. Returns an SVG string.Use for:
- Feature icons
- UI elements
- Decorative icons
- Navigation icons
Link Fields
Link
Link
Link field for both internal and external links. Returns an object with
url and label properties.Use for:- Navigation items
- Call-to-action buttons
- Any clickable links
URL
URL
Simple URL input field.Use for:
- External URLs
- Web addresses
- API endpoints
- Any URL string
Relational Fields
Site Field
Site Field
Connect a block or page type field to a field defined on the site. It receives the source field’s value, whether that value is text, an image, or structured content.Use for:
- Displaying site-wide content in blocks
- Reusing global content across pages
- Referencing branding elements
Available in page types and blocks to reference site-wide content.
When you edit a site field from the block form view, it updates the value site-wide across all blocks that reference it. Site fields cannot be edited inline on the page yet.
Page Field
Page Field
Connect a block field to a field defined on the current page’s type. It receives that page’s value.Use for:
- Displaying page title in blocks
- Showing page metadata in blocks
Available in blocks to reference page-level content.
When you edit a page field from the block form view, it updates the value for that specific page across all blocks that reference it. For example, updating
featured_image changes every place your code uses that page field. Header images, social metadata, and article lists must each be connected explicitly.Page fields cannot be edited inline on the page yet.
Page
Page
Let an editor choose one page of a configured page type. Create that page type first; names such as Person and Blog Post below are examples.Use for:The
- Article author (Person page type)
- Featured article (Blog Post page type)
- Related pages
_meta property provides:_meta.url: Page URL for linking_meta.slug: Page slug_meta.name: Page name
- Page Type: Required. Specifies which page type to select from (e.g., “Person”, “Blog Post”)
Page List
Page List
Supply all pages of a configured page type to your block code. Your code renders the list; editors do not choose individual entries in this field.Use for:Options:
- Team member listings (all Person pages)
- Blog index (all Blog Post pages)
- Automatic page lists
- Page Type: Required. Specifies which page type to output (e.g., “Person”, “Blog Post”)
If you want editors to choose specific pages, use a Repeater field with nested Page fields instead. To exclude selected pages, add a Repeater containing a Page field and filter the Page List in your block code; see the example below.
Structured Fields
Repeater
Repeater
Repeatable group of fields.Use for:
- Feature lists
- Testimonials
- FAQ items
- Image galleries
- Card grids
A “Features” block might use a repeater named
features with fields: title (Text), description (Text), and icon (Image). Editors can add multiple features, and each gets the same set of fields.Group
Group
Group of related fields displayed together.Use for:
- Contact details (email + phone + address)
- Card content (title + description + cta_link)
- Author info (name + bio + photo)
Utility Fields
Info
Info
Display-only field for showing helpful information to editors. Supports Markdown formatting and does not store any data—it only displays content in the editor interface.Use for:
- Instructions for complex fields
- Explanatory notes about content requirements
- Documentation for editors
Field Configuration
All fields share these base properties:- Type: The field type (text, image, select, etc.)
- Label: Display name shown to editors
- Key: The variable name used in your component code
Field-Specific Options
Some field types have additional configuration options: Select:- Options: Array of choices, each with value, label, and optional icon
- Max Size (MB): Maximum file size in megabytes
- Max Dimension (px): Maximum dimension (width or height) in pixels
- Page Type: The type editors choose from (Page) or the type whose pages are returned (Page List)
Conditional Display
Fields can be conditionally shown or hidden based on other field values. Conditions are primarily designed for Select and Toggle fields, but also work with Text, URL, and Number fields. When you add a condition (“Show if”):- Field: Select which field to check (must be a preceding field at the same level)
- Comparison: Choose “Equals” or “Doesn’t equal” (≠)
- Value: The value to compare against
Conditions show relevant form fields based on other selections; they do not hide content in the published page. Add a matching condition in your block code when needed. For example, to show an image field only when a “Show Image” toggle is enabled, the “Show Image” toggle must come first in the field list, then the image field below it with the condition. Fields can only reference fields that appear before them in the list.
Best Practices
1. Choose the Right Field Type
Match field types to their purpose:- ✅ Text for headlines
- ✅ Rich Text for formatted content
- ✅ Image for photos
- ✅ Select for categories
- ❌ Text for long articles (use Rich Text)
- ❌ Number for phone numbers (use Text)
2. Handle empty values
The browser compiler supplies your defined fields as block props. Handle empty or missing values with fallbacks or conditional rendering:3. Use Helpful Labels
Clear labels help editors understand fields:- ✅ “Featured Image”
- ✅ “Publication Date”
- ✅ “Author Name”
- ❌ “Field 1”
- ❌ “Data”
4. Add an Info field
Use an Info field to guide editors:Field: “Featured Image”
Example Info field content: “Choose a landscape image for the post header and add descriptive alt text.” Describe social-sharing use only if your code connects the image to social metadata.
Field Combinations
These are examples you can build from the field types above, not predefined block schemas. Create the listed fields and any referenced page types before using the code.Common Patterns
Hero Block:headline(Text)subheadline(Text)cta(Link)background_image(Image, optional)
title(Text)description(Rich Text)image(Image, optional)link(Link, optional)
features(Repeater) with:title(Text)description(Text)icon(Image, optional)
employees(Repeater) with:employee(Page, limited to “Person” page type)
all_team(Page List, “Person” page type)excluded_members(Repeater) with:member(Page, limited to “Person” page type)
Next Steps
Working with Fields
Learn how to add fields to your components.
Writing Components
See how fields work in component code.
Defining Page Types
Use fields in page type configuration.
Building from Scratch
See fields in action with real examples.