Schema reference
An exhaustive reference for the Toolpad file formats.
Files
These are the various files supported by toolpad.
Page
object
Defines the version of this object. Used in determining compatibility between Toolpad "page" objects.
apiVersion: "v1"Describes the nature of this Toolpad "page" object.
kind: "page"Defines the shape of this "page" object
spec: object Serves as a canonical id of the page.
id: stringTitle for this page.
title: stringParameters for the page. These can be set inside of the url query string.
parameters: array of NameStringValuePairQueries that are used by the page. These will load data when the page opens.
queries: array of object A name for the query
name: stringActivates or deactivates the query. When deactivated the data won't be loaded when the page opens.
enabled: any of Parameters to pass to this query.
parameters: array of A name/value pair.
object How to fetch this query.
mode: any of - Fetch automatically when the page opens"query"
- Fetch on manual action only"mutation"
Query definition
query: any of - object Designates this object as a fetch query.kind: "rest"The URL of the requesturl: any ofThe request method.method: stringExtra request headers.headers: array of BindableNameStringValueExtra url query parameters.searchParams: array of BindableNameStringValueThe request body.body: any of
- object
- object
Run a custom transformer on the response.transformEnabled: booleanThe custom transformer to run when enabled.transform: stringHow to parse the response.response: any of - object
- object
Transformation to run on the response
transform: stringEnable the transformation
transformEnabled: booleanInterval to rerun this query at
refetchInterval: numberTime to cache before refetching
cacheTime: numberThe content of the page. This defines the UI.
content: array of ElementThe content of the page as JSX. Experimental, do not use!.
unstable_codeFile: stringDisplay mode of the page. This can also be set at runtime with the toolpad-display query parameter
display: any of - Hide the Toolpad chrome and just display the content of the page"standalone"
- Show Toolpad header and navigation."shell"
Theme
object
Defines the version of this object. Used in determining compatibility between Toolpad "theme" objects.
apiVersion: "v1"Describes the nature of this Toolpad "theme" object.
kind: "theme"Defines the shape of this "theme" object
spec: object Definitions
These are shared definitions used throughout Toolpad files.
JsExpressionBinding
A binding that evaluates an expression and returns the result.
object
EnvBinding
An environment variable.
object
JsExpressionAction
A javascript expression to be executed when this action is triggered.
object
NavigationAction
A navigation from one page to another, optionally passing parameters to the next page.
object
$$navigationAction: object
The page that is being navigated to
page: stringParameters to pass when navigating to this page
parameters: object BindableProp
any of
- string
- number
- boolean
- null
- array of BindableProp
- object
- JsExpressionBinding
- EnvBinding
- JsExpressionAction
- NavigationAction
- Template
Element
The instance of a component. Used to build user interfaces in pages.
object
The component that this element was based on.
component: stringa name for this component, which is used to reference it inside bindings.
name: stringLayout properties for this element.
layout: object Lays out the element along the horizontal axis.
horizontalAlign: stringLays out the element along the vertical axis.
verticalAlign: stringThe width this element takes up, expressed in terms of columns on the page.
columnSize: numberThe children of this element.
children: array of ElementThe properties to configure this instance of the component.
props: object Template
Describes a fragment of Toolpad elements, to be used as a template.
object
NameStringValuePair
a name/value pair with a string value.
BindableNameStringValue
A name/value pair where the value is dynamically bindable to strings.
object
SimplePaletteColorOptions
object