Shopstory
  • Overview
  • Getting started
    • Installation
    • Connecting CMS
      • Contentful
      • Sanity
    • Displaying content
    • Content modeling with Shopstory
  • Devices and breakpoints
  • Design tokens
    • Colors
    • Spacings
    • Fonts
    • Page containers
      • Margins
      • Max width
    • Aspect ratios
    • Missing tokens
  • Custom code
    • Components
    • Buttons
    • Actions
    • Links
  • Resources
  • Image
  • Analytics
  • Schema reference
  • CMS Guides
    • Contentful
    • Sanity
Powered by GitBook
On this page
  • type: boolean
  • type: select
  • type: text
  • type: string
  • type: resource

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",
}

PreviousAnalyticsNextCMS Guides

Last updated 2 years ago

3rd party resource. Read to learn more.

this guide