The Component Schema Field Object
Retrieve an object of the block’s (component) field schema.
Each field type included in a block can have a set of properties, but some are exclusive to specific types, like Blocks or References.
Properties
Section titled “Properties”-
typestringThe field type.
-
requiredbooleanDefine the field as mandatory. Defaults to
false. -
descriptionstringThe description displayed in the editor.
-
tooltipbooleanSet to
trueto display the description as a tooltip. Defaults tofalse. -
posnumberThe field’s position within the block.
-
idstringThe ID of the field.
-
translatablebooleanSet to
trueto enable translation. Defaults tofalse. -
default_valuestringThe field’s default value. Can be an escaped
JSONobject. -
display_namestringThe name displayed in the editor.
-
maximumnumberThe maximal number of components allowed inside a
Blocksfield. -
minimumnumberThe minimal number of components allowed inside a
Blocksfield. -
restrict_typestringSpecify which blocks are allowed or not inside
BlocksandRichtextfields. Supported types aregroups(blocks in specific folders),tags(blocks assigned to specific tags), or""for specific blocks (components). Find the list of component names/group UUIDs/tag IDs in the respective*_whitelist/*_denylist. -
restrict_componentsbooleanAllow or deny access to nestable blocks inside
BlocksandRichtextfields. Defaults tofalse(allowed). -
component_whiteliststring[]An array of nestable or universal type block names allowed inside
Blocks,Link, andRichtextfields. -
component_denyliststring[]An array of block names not allowed inside
Blocks,Link, andRichtextfields. -
component_tag_whitelistnumber[]An array of tag IDs assigned to blocks allowed inside
BlocksandRichtextfields. -
component_tag_denylistnumber[]An array of tag IDs assigned to blocks not allowed inside
BlocksandRichtextfields. -
component_group_whiteliststring[]An array of group (folder) UUIDs that contain blocks allowed inside
BlocksandRichtextfields. -
component_group_denyliststring[]An array of group (folder) UUIDs that contain blocks not allowed inside
BlocksandRichtextfields. -
no_translatebooleanExclude
Textandnumberfields from translation exports. -
rtlbooleanEnable global right-to-left (RTL) support in
Markdown,Text, andTextareafields. -
regexstringClient regular expression (regex) validation for the
Textfield. -
max_lengthnumberSet the maximum length of the input string in
Markdown,Text, andTextareafields. -
style_optionsobject[]Objects containing data about custom CSS set inside the
Richtextfield.Show child properties
-
_uidstringThe unique ID of the style within the story.
-
namestringThe style’s name.
-
valuestringThe style’s value.
-
-
customize_toolbarbooleanSet to
trueto enable a customized toolbar inMarkdownandRichtextfields. Defaults tofalse. -
toolbarstring[]An array of enabled toolbar elements.
-
allow_target_blankbooleanAllow links in
LinkandRichtextfields to open in a new tab. -
allow_custom_attributesbooleanEnable link custom attributes in
LinkandRichtextfields. -
rich_markdownbooleanDisplay markdown in
Markdownfields as rich text. Defaults tofalse. -
allow_multilinebooleanAllow empty paragraphs in
Markdownfields. Defaults tofalse. -
min_valuenumberThe minimal value allowed in a
Numberfield. -
max_valuenumberThe maximal value allowed in a
Numberfield. -
decimalsnumberThe number of decimal places that appear after the point in a
Numberfield. -
stepsnumberThe interval between numbers in a
Numberfield. -
disable_timebooleanDisable time selection in the date picker of a
Date/Timefield. Defaults tofalse. -
inline_labelbooleanDisplay a
Booleanfield’s label next to the toggle. -
exclude_empty_optionbooleanHide empty options in
Single-OptionandMulti-Optionsfields. -
sourceenumThe source of
Single-OptionandMulti-OptionsfieldsValue Description undefinedSelf internal_storiesStories internal_languagesThe languages defined in the space externalAPI endpoint of a datasource entries array internalDatasource -
optionsobject[]An array of datasource entries available in
Single-Option,Multi-Options, andPluginfields. Relevant only when thesourceisundefined(Self).Show child properties
-
_uidstringThe unique ID of the option.
-
namestringThe option’s name.
-
valuestringThe option’s value.
-
-
use_uuidbooleanWhen the
sourceof aSingle-Option,Multi-Options, andReferencesfield is set tointernal_stories(Stories), displays the UUID of the selected story. Defaults totrue. -
datasource_slugstringWhen the
sourceof aSingle-Option,Multi-Options, orPluginfield is set tointernal(Datasource), displays the selectable datasource. -
external_datasourcestringWhen the
sourceof aSingle-OptionandMulti-Optionsfield is set toexternal(API endpoint of a datasource entries array), define the datasourceJSONURL. -
folder_slugstringWhen the
sourceof aSingle-Option,Multi-Options, andReferencesfield is set tointernal_stories(Stories), set the path of the allowed stories folder. -
max_optionsstringThe maximal number of selectable options in
Single-Option,Multi-Options, andReferencesfields. -
min_optionsstringThe minimal number of selectable options in
Single-Option,Multi-Options, andReferencesfields. -
filter_content_typestring[]When the
sourceof aSingle-OptionandMulti-Options, andReferencesfield is set tointernal_stories(Stories), allow users to select stories from an array of permitted content type blocks. -
entry_appearancestringWhen the
sourceof aSingle-Option,Multi-Options, andReferencesfield is set tointernal_stories(Stories), specify if the option appears as alink(default) or acard. -
allow_advanced_searchbooleanWhen the
sourceof aSingle-Option,Multi-Options, andReferencesfield is set tointernal_stories(Stories), allow users to search stories in a modal window that supports filtering, sorting, and pagination. Defaults tofalse. -
is_reference_typebooleanSet to
trueif theMulti-Optionsfield is aReferencesfield. -
filetypesstring[]An array of asset file types allowed in
AssetandMulti-Assetsfields. For example,\["images", "videos", "audios", "texts"\]. -
asset_folder_idnumberNumeric ID of the asset folder allowed in
AssetandMulti-Assetsfields. -
allow_external_urlbooleanAllow loading assets from an external URL in
AssetandMulti-Assetsfields. Defaults tofalse. -
email_link_typebooleanAllow specifying an email address in a
Linkfield. Defaults tofalse. -
asset_link_typebooleanAllow specifying an asset’s URL in a
Linkfield. Defaults tofalse. -
show_anchorbooleanWhen the URL in a
Linkfield is an Internal link, allow users to define an anchor ID. Defaults tofalse. -
allow_target_blankbooleanAllow links set in a
Linkfield to open in a new tab. Defaults tofalse. -
allow_custom_attributesbooleanAllow setting custom attributes in a
Linkfield. Defaults tofalse. -
restrict_content_typesbooleanWhen the URL in a
Linkfield is an Internal link, allow users to select stories from an array of allowed content type blocks. Defaults tofalse. -
component_whiteliststring[]When
restrict_content_typesis set totruein aLinkfield, specify the allowed content type blocks. -
force_link_scopebooleanWhen the URL in a
Linkfield is an Internal link, allow users to only select stories from a specific folder. Defaults tofalse. -
link_scopestringWhen
force_link_scopeis set totruein aLinkfield, specify the allowed path. -
keysstring[]An array of field keys displayed in a
Groupfield (not to be confused with field keys that appear in tabs in the Visual Editor). -
field_typestringThe name of the field type plugin used in a
Pluginfield. -
required_fieldsstringA comma-separated list of names of fields the user is required to fill in in a
Pluginfield. -
exclude_from_ai_translationbooleanExclude the field from /docs/manuals/ai-assistance#ai-translations.
-
exclude_from_mergebooleanExclude the field when merging (requires the Dimensions App).
-
exclude_from_overwritebooleanExclude the field when overwriting (requires the Dimensions App).
-
force_mergebooleanOverwrite the field when merging (requires the Dimensions App).
-
conditional_settingsobject[]An array that contains an object with information about conditions set on the field.
Deprecated fields properties
Section titled “Deprecated fields properties”-
image_cropbooleanFor the deprecated
Imagefield. Activate force crop for images. -
keep_image_sizebooleanFor the deprecated
Imagefield. Keep the original image size. -
image_widthstringFor the deprecated
Imagefield. Ifkeep_image_sizeis set totrue, define the image width in pixels or width ratio. -
image_heightstringFor the deprecated
Imagefield. Ifkeep_image_sizeis set totrue, define the image height in pixels or height ratio. -
add_httpsbooleanFor the deprecated
ImageandFilefields. Prependshttps:to disallow relative paths.
The following snippet includes only a subset of the available properties:
"schema": { "headline": { "type": "text", "pos": 0, "id": "s94HwQuyR9-3bbmTLRXcjQ" }, "references": { "type": "options", "pos": 1, "is_reference_type": true, "source": "internal_stories", "entry_appearance": "card", "allow_advanced_search": true, "folder_slug": "articles/", "filter_content_type": [ "article" ], "id": "3GLw9V2jTnOs7SKSv1CvtQ" }, "image": { "type": "asset", "pos": 2, "id": "msSxIdkqSB-yVb_-wdVztQ", "filetypes": [], "asset_folder_id": null, "allow_external_url": false }}Was this page helpful?
This site uses reCAPTCHA and Google's Privacy Policy (opens in a new window) . Terms of Service (opens in a new window) apply.
Get in touch with the Storyblok community