Atom Widgets
Atom widgets are used to display data without editing capabilities.
Text Atom
Property
Definition
Example
Default
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "TextAtom widget properties",
"type": "object",
"properties": {
"props": {
"type": "object",
"properties": {
"tag": {
"type": "string",
"definition": "Tag to use (p, span, h1..h6, blockquote)",
"example": "h1",
"default": "p",
"enum": ["p", "span", "h1", "h2", "h3", "h4", "h5", "h6", "blockquote"]
},
"dom": {
"type": "object",
"definition": "Attributes to apply to text tag",
"example": { "className": "Custom-image" },
"default": null
}
}
}
}
}Image Atom
Property
Definition
Example
Default
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ImageAtom widget properties",
"type": "object",
"properties": {
"props": {
"type": "object",
"properties": {
"baseUrl": {
"type": "string",
"definition": "Base url for image to be used as a prefix to its data",
"example": "http://cdn.example.com",
"default": null
},
"dom": {
"type": "object",
"definition": "Attributes to apply to image tag",
"example": { "className": "Custom-image" },
"default": null
}
}
}
}
}View Atom
Property
Definition
Example
Default
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ViewAtom widget properties",
"type": "object",
"properties": {
"props": {
"type": "object",
"properties": {
"tag": {
"type": "string",
"definition": "Tag to use (div, main, article, section, header, void)",
"example": "main",
"default": "div",
"enum": ["div", "main", "article", "section", "header", "void"]
},
"dom": {
"type": "object",
"definition": "Attributes to apply to view tag",
"example": { "className": "Custom-image" },
"default": null
},
"contents": {
"type": "array",
"definition": "Complete contents mapping object data paths to widgets and props",
"default": null,
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"definition": "Data path to render",
"example": "name",
"default": null
},
"widget": {
"type": "string",
"definition": "Widget to render for the given path",
"example": "TextAtom",
"default": null
},
"props": {
"type": "object",
"definition": "Widget specific properties for this content entry",
"example": {},
"default": null
}
}
},
"example": [{ "path": "name", "widget": "TextAtom" }]
}
}
}
}
}Link Atom
Property
Definition
Example
Default
Repeat Atom
Property
Definition
Example
Default
Last updated
