Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
The JSON for a simple example Custom Type in Prismic, with two Slices.
{
"Main": {
"uid": {
"type": "UID",
"config": {
"label": "UID",
"placeholder": "hello-world"
}
},
"body": {
"type": "Slices",
"fieldset": "Slice zone",
"config": {
"labels": null,
"choices": {
"text_slice": {
"type": "Slice",
"fieldset": "Text Slice",
"description": "A simple text slice.",
"icon": "format_color_text",
"display": "list",
"non-repeat": {
"key_text": {
"type": "Text",
"config": {
"label": "Key Text"
}
}
},
"repeat": {}
},
"image_gallery_slice": {
"type": "Slice",
"fieldset": "Image Gallery Slice",
"description": "Some text and images.",
"icon": "image",
"display": "list",
"non-repeat": {
"gallery_title": {
"type": "Text",
"config": {
"label": "Gallery Title"
}
}
},
"repeat": {
"gallery_image": {
"type": "Image",
"config": {
"constraint": {
"width": 300,
"height": 300
},
"thumbnails": [],
"label": "Gallery Image"
}
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment