The Component Object
This is an object representing a component in a space. Some properties can be read-only, and others can be managed by the space owner using the Management API.
It is important to note that the name
will be shown to the user in the content editor if the display_name
is null. If display_name
is a string, it will be shown to the user inside the content editor.
There is another field called real_name
which is read-only and is used by Storyblok internally. If display_name
is null, the real_name
is set to name
. If display_name
is a string, the real_name
field has the value of display_name
.
You should use the name
and display_name
for any purpose.
If is_nestable
and is_root
properties are both set to false
, the component is nestable.
Properties
-
id
numberThe numeric ID
-
name
stringTechnical name used for component property in entries
-
display_name
stringName that will be used in the editor interface
-
created_at
stringCreation date (Format:
yyyy-MM-dd'T'HH:mm:ssZ
) -
updated_at
stringLatest update date (Format:
yyyy-MM-dd'T'HH:mm:ssZ
) -
schema
objectKey value pairs of component fields.
-
image
string or nullURL to the preview image, if uploaded
-
preview_field
stringThe field that is for preview in the interface (Preview Field)
-
is_root
booleanTrue if the component can be used as a Content Type
-
preview_tmpl
stringYour component preview template. You can learn how to design your preview template here.
-
is_nestable
booleanTrue if the component is nestable (insertable) in block field types
-
all_presets
object[]An array of presets for this component
-
id
numberThe numeric ID of the preset
-
name
stringName of the preset
-
component_id
numberThe ID of the component the preset is for
-
image
string or nullLink to the preview image of the preset
-
icon
stringIcon selected for the preset
-
color
stringColor of the icon selected for the preset
-
description
stringThe description of the preset
-
-
real_name
stringDuplicated technical name or display name, used for internal tasks
-
component_group_uuid
stringThe component folder ID of the component
-
color
stringThe color of the icon selected for the component
-
icon
stringIcon selected for the component
-
internal_tags_list
object[]List of objects containing the details of tags used for the component
-
id
numberId of the tag
-
name
stringName of the tag
-
-
internal_tag_ids
string[]List of ids of the tags assigned to the component
-
content_type_asset_preview
stringAsset preview field (Preview Card) for a content type component
{
"component": {
"name": "banner_section",
"display_name": null,
"created_at": "2023-03-27T10:35:25.086Z",
"updated_at": "2023-07-04T08:30:54.235Z",
"id": 3672886,
"schema": {
// definition of fields (schema) for this component
"headline": {
"type": "textarea",
"pos": 0,
"translatable": true,
"description": "This field is used to render an H1 title"
}
},
"image": "//a.storyblok.com/f/88751/x/d4284bb2e5/screenshot-2021-05-06-at-15-55-21.png",
"preview_field": null,
"is_root": false,
"preview_tmpl": null,
"is_nestable": true,
"all_presets": [],
"preset_id": null,
"real_name": "banner_section",
"component_group_uuid": "19cb297f-541a-4a23-b02e-66d08e5f6323",
"color": "#fbce41",
"icon": "block-image",
"internal_tags_list": [
{
"id": 43211,
"name": "test"
},
{
"id": 43212,
"name": "test2"
}
],
"internal_tag_ids": [
"43211",
"43212"
],
"content_type_asset_preview": "hero_image"
}
}