Schema reference
This document lists all the available schema property types.
{
prop: "isDark",
type: "boolean",
defaultValue: true // optional
}
{
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" }
]
}
{
prop: "label",
type: "text",
defaultValue: "click me" // optional
}
text
is translateable. It might have different value for different locales. {
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).{
prop: "product",
type: "resource",
resourceType: "product",
}
Last modified 2mo ago