The Component Schema Field Object
There are a few properties which are present in every field type that can be added in a component. Not every property will be used for every field type. Some may only affect specific types. We have mentioned a few fields properties here, but there can be more as well.
Properties
-
type
stringThe type of your field
-
required
booleanIs this field required? Default: false
-
description
stringThe description is shown in the editor interface
-
tooltip
booleanTrue if the description is set to show as a tooltip. Default: false
-
pos
numberPosition of the field in the component.
-
translatable
booleanTrue if the translation is enabled over the field
-
default_value
stringDefault value for the field. Can be an escaped JSON object
-
display_name
stringName that will be used in the editor interface
-
maximum
numberThe maximum amount of components that can be added in a bloks field. Only for type: bloks
-
minimum
numberThe minimum amount of components that should be added in a bloks field. Only for type: bloks
-
restrict_type
stringA string to define what type is used for restricting the components in a bloks field.
Cantags
,groups
(folders), or empty string for specific components. -
restrict_components
booleanActivate restriction nestable component option. Default: false. Only for type: bloks, and richtext (for nestable bloks inside that)
-
component_whitelist
string[]An array of component/content type names: ["post", "page", "product"]. Only for type: bloks, multilink, and richtext (for nestable bloks inside that)
-
component_tag_whitelist
number[]An array of tag IDs. Only the components with these tags can be inserted in the bloks field. Only for type: bloks. and richtext (for nestable bloks inside that)
-
component_group_whitelist
string[]An array of group UUIDs.Only the components that belong to these groups can be inserted in the bloks field. Only for type: bloks, and richtext (for nestable bloks inside that)
-
no_translate
booleanShould be excluded in translation export. Only for type text and number
-
rtl
booleanEnable global RTL for this field. Only for type: markdown, text, textarea
-
regex
stringClient Regex validation for the text field type
-
max_length
numberSet the max length of the input string. Only for type: text, textarea, markdown
-
style_options
object[]Objects containing the data about custom CSS set inside the richtext field.
-
_uid
stringUUID of the style
-
name
stringName of the style that is displayed in the UI
-
value
stringValue of the style that is used
-
-
customize_toolbar
booleanTrue if customization of toolbar in a richtext or markdown field is enabled
-
toolbar
string[]Array containing the value of enabled items while customizing the toolbar of richtext or markdown field
-
allow_target_blank
booleanAllows links inside a richtext field to be open in a new tab and enables an option for the links field to open link in a new tab
-
allow_custom_attributes
booleanFor enabling custom attributes in a link. Works for links inside the richtext field and multilink field.
-
rich_markdown
booleanEnable rich markdown view. Only for type: markdown
-
allow_multiline
booleanEnable empty paragraphs in markdown
-
min_value
numberMinimum value that a number field can have
-
max_value
numberMaximum value that a number field can have
-
decimals
numberThe number of decimal places that appear after the point in a number field
-
steps
numberThe interval between numbers of a number field type
-
disable_time
booleanDisables time selection from the date picker. Default: false. Only for type: datetime
-
inline_label
booleanMakes the label of a boolean field inline
-
exclude_empty_option
booleanHide empty options in the UI in an option or options field
-
options
object[]Array of datasource entries [{name:"", value:""}]; Effects editor only if source=undefined. For field type option.
-
_uid
stringUUID of the option
-
name
stringName of the option
-
value
stringValue of the option
-
-
source
enumOnly for type: option, options, custom
Possible values: undefined Self internal_stories Stories internal Datasource external API Endpoint in Datasource Entries Array Format internal_languages The languages enabled in the space -
use_uuid
booleanDefault: true; available in option and source=internal_stories
-
datasource_slug
stringDefine selectable datasources string; Effects editor only if source=internal for field types option and options
-
external_datasource
stringDefine external datasource JSON Url; Effects editor only if source=external for field types option and options
-
folder_slug
stringFilter on selectable stories path; Effects editor only if source=internal_stories; In case you have a multi-language folder structure you can add the '{0}' placeholder and the path will be adapted dynamically. Examples: "{0}/categories/", {0}/{1}/categories/
-
max_options
stringMaximum options that can be selected in an options field.
-
min_options
stringMinimum options that should be selected in an options field.
-
filter_content_type
string[]An array of content types that can be selected in a option or options field where source is
internal_stories
-
entry_appearance
stringThe appearance type of an option inside the option or options field type when source is
internal_stories
Can belink
orcard
, default:link
-
allow_advanced_search
booleanAllow advance search that enables a separate dialogue for search. Only in option and options field type
-
is_reference_type
booleanTrue if the options field is of type reference
-
filetypes
string[]Array of file type names: ["images", "videos", "audios", "texts"]. Only for type: multiasset
-
asset_folder_id
numberDefault asset folder numeric id to store uploaded image of that field. Only for type: asset
-
allow_external_url
booleanIf the asset or multiasset field allow external URLs
-
email_link_type
booleanAllow emails in the multilink field type. Default: false
-
asset_link_type
booleanAllow assets in the multilink field type. Default: false
-
show_anchor
booleanEnable anchor field on internal links inside multilink field type. Default: false
-
restrict_content_types
booleanActivate the restriction content type option. Only for type: multilink
-
force_link_scope
booleanForce folder restriction on multilink field type. Default: false
-
link_scope
stringFilter on selectable folders when the force folder (
force_link_fields
) is in place. Default: false -
keys
string[]An array of field keys to include in this section (group field types). Only for type: section
-
field_type
stringName of the custom field type plugin. Only for type: custom
-
required_fields
stringComma-separated required fields. Only for type custom
-
image_crop
booleanActivate force crop for images. Only for type: image
-
keep_image_size
booleanKeep the original size. Only for type: image
-
image_width
stringDefine width in px or width ratio if keep_image_size is enabled. Only for type: image
-
image_height
stringDefine height in px or height ratio if keep_image_size is enabled. Only for type: image
-
add_https
booleanPrepends https: to stop the usage of the relative protocol. Only for type: image, file
-
can_sync
booleanAdvanced usage to sync with the field in preview. Default: false
-
exclude_from_merge
booleanExcludes a blok from being merged during a merge action (only works with the Dimensions App)
-
exclude_from_overwrite
booleanExcludes a blok from being overwritten during an overwrite action (only works with the Dimensions App)
-
force_merge
booleanOverwrites a blok during a merge action (only works with the Dimensions App)
-
conditional_settings
object[]Array containing the object with information about conditions set on the field
// name of the field as key eg. "field key" in schema property in your component
"title": {
"type": "text",
"pos": 0,
"translatable": true,
"required": true,
"regex": "",
"description": "Description for the field",
"display_name": "",
"default_value": "",
"can_sync": false,
"rtl": false,
"no_translate": false
}