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”- type string
The field type.
- required boolean
Define the field as mandatory. Defaults to
false. - description string
The description displayed in the editor.
- tooltip boolean
Set to
trueto display the description as a tooltip. Defaults tofalse. - pos number
The field’s position within the block.
- id string
The ID of the field.
- translatable boolean
Set to
trueto enable translation. Defaults tofalse. - default_value string
The field’s default value. Can be an escaped
JSONobject. - display_name string
The name displayed in the editor.
- maximum number
The maximal number of components allowed inside a
Blocksfield. - minimum number
The minimal number of components allowed inside a
Blocksfield. - restrict_type string
Specify 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_components boolean
Allow or deny access to nestable blocks inside
BlocksandRichtextfields. Defaults tofalse(allowed). - component_whitelist string[]
An array of nestable or universal type block names allowed inside
Blocks,Link, andRichtextfields. - component_denylist string[]
An array of block names not allowed inside
Blocks,Link, andRichtextfields. - component_tag_whitelist number[]
An array of tag IDs assigned to blocks allowed inside
BlocksandRichtextfields. - component_tag_denylist number[]
An array of tag IDs assigned to blocks not allowed inside
BlocksandRichtextfields. - component_group_whitelist string[]
An array of group (folder) UUIDs that contain blocks allowed inside
BlocksandRichtextfields. - component_group_denylist string[]
An array of group (folder) UUIDs that contain blocks not allowed inside
BlocksandRichtextfields. - no_translate boolean
Exclude
Textandnumberfields from translation exports. - rtl boolean
Enable global right-to-left (RTL) support in
Markdown,Text, andTextareafields. - regex string
Client regular expression (regex) validation for the
Textfield. - max_length number
Set the maximum length of the input string in
Markdown,Text, andTextareafields. - style_options object[]
Objects containing data about custom CSS set inside the
Richtextfield.Show child properties
- _uid string
The unique ID of the style within the story.
- name string
The style’s name.
- value string
The style’s value.
-
- customize_toolbar boolean
Set to
trueto enable a customized toolbar inMarkdownandRichtextfields. Defaults tofalse. - toolbar string[]
An array of enabled toolbar elements.
- allow_target_blank boolean
Allow links in
LinkandRichtextfields to open in a new tab. - allow_custom_attributes boolean
Enable link custom attributes in
LinkandRichtextfields. - rich_markdown boolean
Display markdown in
Markdownfields as rich text. Defaults tofalse. - allow_multiline boolean
Allow empty paragraphs in
Markdownfields. Defaults tofalse. - min_value number
The minimal value allowed in a
Numberfield. - max_value number
The maximal value allowed in a
Numberfield. - decimals number
The number of decimal places that appear after the point in a
Numberfield. - steps number
The interval between numbers in a
Numberfield. - disable_time boolean
Disable time selection in the date picker of a
Date/Timefield. Defaults tofalse. - inline_label boolean
Display a
Booleanfield’s label next to the toggle. - exclude_empty_option boolean
Hide empty options in
Single-OptionandMulti-Optionsfields. - source enum
The source of
Single-OptionandMulti-OptionsfieldsValue Description undefinedSelf internal_storiesStories internal_languagesThe languages defined in the space externalAPI endpoint of a datasource entries array internalDatasource - options object[]
An array of datasource entries available in
Single-Option,Multi-Options, andPluginfields. Relevant only when thesourceisundefined(Self).Show child properties
- _uid string
The unique ID of the option.
- name string
The option’s name.
- value string
The option’s value.
-
- use_uuid boolean
When the
sourceof aSingle-Option,Multi-Options, andReferencesfield is set tointernal_stories(Stories), displays the UUID of the selected story. Defaults totrue. - datasource_slug string
When the
sourceof aSingle-Option,Multi-Options, orPluginfield is set tointernal(Datasource), displays the selectable datasource. - external_datasource string
When the
sourceof aSingle-OptionandMulti-Optionsfield is set toexternal(API endpoint of a datasource entries array), define the datasourceJSONURL. - folder_slug string
When the
sourceof aSingle-Option,Multi-Options, andReferencesfield is set tointernal_stories(Stories), set the path of the allowed stories folder. - max_options string
The maximal number of selectable options in
Single-Option,Multi-Options, andReferencesfields. - min_options string
The minimal number of selectable options in
Single-Option,Multi-Options, andReferencesfields. - filter_content_type string[]
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_appearance string
When the
sourceof aSingle-Option,Multi-Options, andReferencesfield is set tointernal_stories(Stories), specify if the option appears as alink(default) or acard. - allow_advanced_search boolean
When 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_type boolean
Set to
trueif theMulti-Optionsfield is aReferencesfield. - filetypes string[]
An array of asset file types allowed in
AssetandMulti-Assetsfields. For example,\["images", "videos", "audios", "texts"\]. - asset_folder_id number
Numeric ID of the asset folder allowed in
AssetandMulti-Assetsfields. - allow_external_url boolean
Allow loading assets from an external URL in
AssetandMulti-Assetsfields. Defaults tofalse. - email_link_type boolean
Allow specifying an email address in a
Linkfield. Defaults tofalse. - asset_link_type boolean
Allow specifying an asset’s URL in a
Linkfield. Defaults tofalse. - show_anchor boolean
When the URL in a
Linkfield is an Internal link, allow users to define an anchor ID. Defaults tofalse. - allow_target_blank boolean
Allow links set in a
Linkfield to open in a new tab. Defaults tofalse. - allow_custom_attributes boolean
Allow setting custom attributes in a
Linkfield. Defaults tofalse. - restrict_content_types boolean
When 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_whitelist string[]
When
restrict_content_typesis set totruein aLinkfield, specify the allowed content type blocks. - force_link_scope boolean
When the URL in a
Linkfield is an Internal link, allow users to only select stories from a specific folder. Defaults tofalse. - link_scope string
When
force_link_scopeis set totruein aLinkfield, specify the allowed path. - keys string[]
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_type string
The name of the field type plugin used in a
Pluginfield. - required_fields string
A comma-separated list of names of fields the user is required to fill in in a
Pluginfield. - exclude_from_ai_translation boolean
Exclude the field from /docs/manuals/ai-assistance#ai-translations.
- exclude_from_merge boolean
Exclude the field when merging (requires the Dimensions App).
- exclude_from_overwrite boolean
Exclude the field when overwriting (requires the Dimensions App).
- force_merge boolean
Overwrite the field when merging (requires the Dimensions App).
- conditional_settings object[]
An array that contains an object with information about conditions set on the field.
Deprecated fields properties
Section titled “Deprecated fields properties”- image_crop boolean
For the deprecated
Imagefield. Activate force crop for images. - keep_image_size boolean
For the deprecated
Imagefield. Keep the original image size. - image_width string
For the deprecated
Imagefield. Ifkeep_image_sizeis set totrue, define the image width in pixels or width ratio. - image_height string
For the deprecated
Imagefield. Ifkeep_image_sizeis set totrue, define the image height in pixels or height ratio. - add_https boolean
For 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. Terms of Service apply.
Get in touch with the Storyblok community