Shopstory
Search
K

Schema reference

This document lists all the available schema property types.

type: boolean

{
prop: "isDark",
type: "boolean",
defaultValue: true // optional
}

type: select

{
prop: "animal",
type: "select",
options: ["dog", "cat", "elephant"],
defaultValue: "cat" // optional
}
You can set labels for options:
{
prop: "animal",
type: "select",
options: [
{ value: "dog", label: "Dog" },
{ value: "cat", label: "Cat" },
{ value: "elephant", label: "Elephant" }
]
}

type: text

{
prop: "label",
type: "text",
defaultValue: "click me" // optional
}
text is translateable. It might have different value for different locales.

type: string

{
prop: "url",
type: "string",
defaultValue: "https://shopstory.app" // optional
}
string is very similar to text but it's not translateable. All locales share the same value. It might be a good choice for URL routes (unless they are translated).

type: resource

{
prop: "product",
type: "resource",
resourceType: "product",
}
3rd party resource. Read this guide to learn more.
Last modified 5mo ago