Skip to main content
The Text field stores a string and provides a text input in the admin panel. For web addresses, phone numbers and barcodes, use a URL, Phone or Barcode field. To have AI write the text from other fields, use an AI field.

Config options

Admin options

Text fields support the standard field admin options, plus these options:

Example

Custom components

Field

Server component

Client component

Label

Server component

Client component

Slug field

slugField returns the built-in Slug field (type: 'slug'): a unique, indexed string generated from another field, shown in the sidebar. Editors can unlock it to edit it, or regenerate it on demand in the admin panel.
The slug fills once while it’s empty and then stays, so editing the title never changes a live URL:
  • On create, an empty slug is generated from useAsSlug. Without a source value, it becomes <singular>-<N>, such as pages-1, so a record always has one.
  • An explicit value wins and goes through slugify, so Hello World becomes hello-world. A value another record already uses is rejected.
  • Generated values skip slugs other records already use.
slugField(options) is the same as writing { name: 'slug', type: 'slug', ...options }. Besides the usual field options, such as label, localized, required, unique, index, defaultValue and admin, it takes:

Custom slugify function

The function receives the complete document data, the source value, and the framework-issued FrogBotRequest. It may return a string or undefined, synchronously or asynchronously. Rejections stop the save.