Property-Types
Definition of all available property-types
These are the different inputs available for component form-structure.
Number
type Number = {
id: string;
label: Record<string, string>;
description?: string;
defaultValue?: number;
hint?: string;
min?: number;
max?: numer;
step?: number;
}
{
"type": "number",
"label": {
"de": "Breite",
"en": "Width"
},
"defaultValue": 50,
"min": 0,
"max": 100,
"step": 1,
"hint": "The width of this element"
}
Range
type Range = {
id: string;
label: Record<string, string>;
description?: string;
defaultValue?: number;
hint?: string;
min: number;
max: numer;
step?: number;
}
{
"type": "range",
"label": {
"de": "Reichweite",
"en": "Range"
},
"id": "range",
"min": 0,
"max": 100,
"step": 1
}
Checkbox
type Checkbox = {
id: string;
label: Record<string, string>;
description?: string;
defaultValue?: boolean;
hint?: string;
}
{
"type": "checkbox",
"id": "check",
"label": {
"de": "Checkbox",
"en": "Checkbox"
},
"defaultValue": true
}
RelationRules
type RelationRules = {
id: string;
label: Record<string, string>;
description?: string;
defaultValue?: unknown;
hint?: string;
relationName: "tag" | "user" | "page" | "post" | "file";
}
{
"type": "relationRules",
"id": "posts",
"label":{
"de": "Posts",
"en": "Posts"
},
"relationName": "post"
}
Relation
type Relation = {
id: string;
label: Record<string, string>;
description?: string;
defaultValue?: Array<string>;
hint?: string;
relationName: "tag" | "user" | "page" | "post" | "file";
multiple?: boolean;
}
{
"type": "relation",
"id": "image",
"label": {
"en": "Image-file",
"de": "Bilddatei"
},
"relationName": "file"
}
Richtext
type Richtext = {
id: string;
label: Record<string, string>;
description?: string;
defaultValue?: string;
hint?: string;
}
{
"type": "richtext",
"id": "content",
"label": {
"de": "Inhalt",
"en": "Content"
}
}
Code
type Code = {
id: string;
label: Record<string, string>;
description?: string;
defaultValue?: string;
hint?: string;
language: "json" | "js" | "css" | "html";
}
{
"type": "code",
"id": "onclick",
"label": {
"de": "Code",
"en": "Code"
},
"language": "js"
}
Text
type Text = {
id: string;
label: Record<string, string>;
description?: string;
defaultValue?: string;
hint?: string;
}
{
"type": "text",
"id": "content",
"label": {
"de": "Inhalt",
"en": "Content"
}
}
Textarea
type Textarea = {
id: string;
label: Record<string, string>;
description?: string;
defaultValue?: string;
hint?: string;
}
{
"type": "textarea",
"id": "content",
"label": {
"de": "TextArea",
"en": "Textarea"
}
}
Accordion
type Accordion = {
id: string;
label: Record<string, string>;
description?: string;
defaultValue?: unknown;
hint?: string;
items: Array<{
id: string;
description: Record<string, string>;
properties: Array<Form>;
}>;
}
{
"type": "accordion",
"label": {
"de": "Accordion",
"en": "Accordion"
},
"id": "accordeon",
"items": [
{
"label": {
"de": "properties",
"en": "properties"
},
"id": "items",
"description": {
"de": "items",
"en": "items"
},
"properties": [
{
"type": "textarea",
"label": {
"de": "TextArea",
"en": "Textarea"
},
"id": "textarea"
}
]
}
]
}
Select
type Select<T extends string | number> = {
id: string;
label: Record<string, string>;
description?: string;
defaultValue?: T;
hint?: string;
options: Array<{
value: T;
label: Record<string, string>
}>;
dataType: "string" | "number";
multiple?: boolean;
}
{
"type": "select",
"id": "select_mobile",
"dataType": "number",
"label": {
"en": "Mobile Columns",
"de": "Mobile Spalten"
},
"option": [
{
"label": {
"en": "One",
"de": "Eins"
},
"value": 1
},
{
"label": {
"en": "Two",
"de": "Zwei"
},
"value": 2
}
]
}
Key-value
type KeyValue = {
id: string;
label: Record<string, string>;
description?: string;
defaultValue?: Record<any, any>;
hint?: string;
value: FormItem;
key: FormItem;
}
{
"type": "key-value",
"id": "keyV",
"label": {
"de": "Schlüssel",
"en": "Key"
},
"key": {
"type": "text",
"id": "key",
"label": {
"de": "Schlüssel",
"en": "Key"
}
},
"value": {
"type": "text",
"id": "value",
"label": {
"de": "Text",
"en": "Text"
}
}
}
Buider
type Builder = {
id: string;
label: Record<string, string>;
description?: string;
defaultValue?: unknown;
hint?: string;
previewTemplate?: string;
items: Array<any>;
}
{
"type": "builder",
"items": [
{
"type": "textarea",
"id": "textarea",
"label": {
"de": "textarea",
"en": "teaxtarea"
}
}
],
"label": {
"de": "Bauer",
"en": "Builder"
},
"id": "builder"
}
Buttongroup
type Buttongroup = {
id: string;
label: Record<string, string>;
description?: string;
defaultValue?: string;
hint?: string;
options: Array<{
value: string;
label: Record<string, string>;
}>;
}
{
"type": "buttongroup",
"label": {
"de": "Buttongruppe",
"en": "Buttongroup"
},
"id": "buttongroup",
"options": [
{
"label": {
"de": "Aktiv",
"en": "Active"
},
"value": "active"
},
{
"label": {
"de": "Inaktiv",
"en": "Inactive"
},
"value": "inactive"
}
]
}
PluginData
type PluginData = {
id: string;
label: Record<string, string>;
description?: string;
defaultValue?: unknown;
hint?: string;
pluginId: string;
labelKey: string;
valueKey: string;
filterByKey?: string;
}
{
"type": "pluginData"
"label": {
"en": "Select Form",
"de": "Formular"
},
"id": "selectForm",
"pluginId": "form-plugin",
"filterByKey": "form",
"labelKey": "form.name",
"valueKey": "form"
}