Schema reference
An exhaustive reference for the Toolpad Studio file formats.
Files
These are the various files supported by toolpad.
Application
object
Defines the version of this object. Used in determining compatibility between Toolpad Studio "application" objects.
apiVersion: "v1"Describes the nature of this Toolpad Studio "application" object.
kind: "application"Defines the shape of this "application" object
spec: object The plan for this application.
plan: "free" | "pro"Authentication configuration for this application.
authentication: object Authentication providers to use.
providers: array of object Valid email patterns for the authenticated user.
restrictedDomains: array of stringAuthorization configuration for this application.
authorization: object Available roles for this application. These can be assigned to users.
roles: array of any of - string
- object
Page
object
Defines the version of this object. Used in determining compatibility between Toolpad Studio "page" objects.
apiVersion: "v1"Describes the nature of this Toolpad Studio "page" object.
kind: "page"Defines the shape of this "page" object
spec: object Page name to display in the UI.
displayName: stringServes as a canonical id of the page. Deprecated: use an alias instead.
id: stringPage name aliases.
alias: array of 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 ElementAuthorization configuration for this page.
authorization: object Allow all users to access this page.
allowAll: booleanRoles that are allowed to access this page.
allowedRoles: array of stringDisplay mode of the page. This can also be set at runtime with the toolpad-display query parameter
display: any of - Hide the Toolpad Studio chrome and just display the content of the page"standalone"
- Show Toolpad Studio header and navigation."shell"
Top level element of the page.
maxWidth: "xs" | "sm" | "md" | "lg" | "xl" | "none"Theme
object
Defines the version of this object. Used in determining compatibility between Toolpad Studio "theme" objects.
apiVersion: "v1"Describes the nature of this Toolpad Studio "theme" object.
kind: "theme"Defines the shape of this "theme" object
spec: object Definitions
These are shared definitions used throughout Toolpad Studio 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 height this element takes up, in pixels.
height: 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 Studio 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