Available components panel configuration

Customizes the left panel from which you can drag and drop components into the editor.

Interface Overview

AvailableComponentsPanelConfigI

Property nameTypeRequiredDescription
groupsAvailableComponentsGroupI[]YesArray of component groups to display in the panel
showRequestComponentButtonbooleanNoDecide whether to display the "Request Component" button at the bottom of the panel. Clicking the button opens a chat with predefined text.

AvailableComponentsGroupI

Property nameTypeRequiredDescription
labelstringYesLabel for the component group
componentsAvailableComponentI[]YesArray of components in the group

AvailableComponentI

Property nameTypeRequiredDescription
componentNamestringYesName of the component
customIconstringNoA custom icon for the component. If not provided, the icon from the component's manifest will be used.
customLabelstringNoA custom label for the component. If not provided, the label from the component's manifest will be used.
fullWidthIconbooleanNoWhether the icon should be full width. Label will be hidden.
modelOverridesanyNoModel overrides for the component. See the default configuration for an example of how to use it.
floatingImagebooleanNoIt transforms the SysImageComponent manifest into a floating image.

Default configuration

{
   groups: [
      {
         label: 'Columns',
         components: [
            {
               componentName: 'SysColumnsComponent',
               fullWidthIcon: true,
               customIcon: '/claspo-editor/columns-frame-100.svg',
               modelOverrides: {
                  // creates single full width column
                  children: [
                     {
                        componentName: 'SysColumnComponent',
                     }
                  ]
               },
            },
            {
               componentName: 'SysColumnsComponent',
               fullWidthIcon: true,
               customIcon: '/claspo-editor/columns-frame-50-50.svg',
               modelOverrides: {
                  // creates two columns with a 1:1 proportion
                  children: [
                     {
                        componentName: 'SysColumnComponent',
                     },
                     {
                        componentName: 'SysColumnComponent',
                     },
                  ],
               }
            },
            {
               componentName: 'SysColumnsComponent',
               fullWidthIcon: true,
               customIcon: '/claspo-editor/columns-frame-33-66.svg',
               modelOverrides: {
                  // creates two columns with a 1:2 proportion
                  children: [
                     {
                        componentName: 'SysColumnComponent',
                        modelOverrides: {
                           props: {
                              content: {
                                 size: '1',
                              },
                           },
                        }
                     },
                     {
                        componentName: 'SysColumnComponent',
                        modelOverrides: {
                           props: {
                              content: {
                                 size: '2',
                              },
                           },
                        }
                     },
                  ],
               }
            }
         ]
      },
      {
         label: 'General',
         components: [
            {
               componentName: 'SysTextComponent',
            },
            {
               componentName: 'SysContainerComponent',
            },
            {
               componentName: 'SysImageComponent',
            },
            {
               componentName: 'SysImageComponent',
               customIcon: 'BASE_URL/floating-image-component-icon.svg',
               floatingImage: true,
            },
            {
               componentName: 'SysButtonComponent',
            }
         ]
      },
      {
         label: 'Fields',
         components: [
            {
               componentName: 'SysInputComponent',
               customLabel: 'Email',
               customIcon: 'BASE_URL/email-input-component-icon.svg',
               modelOverrides: {
                  props: {
                     control: {
                        name: 'email',
                        integrationName: 'email',
                     },
                     content: {
                        placeholder: 'Email',
                     },
                  }
               }
            },
            {
               componentName: 'SysPhoneInputComponent',
            },
            {
               componentName: 'SysInputComponent',
               customLabel: 'Firs name',
               customIcon: 'BASE_URL/person-data-input-component-icon.svg',
               modelOverrides: {
                  props: {
                     control: {
                        name: 'first_name',
                        integrationName: 'first_name',
                     },
                     content: {
                        placeholder: 'First name',
                     },
                  },
               }
            },
            {
               componentName: 'SysInputComponent',
               customLabel: 'Last name',
               customIcon: 'BASE_URL/person-data-input-component-icon.svg',
               modelOverrides: {
                  props: {
                     control: {
                        name: 'last_name',
                        integrationName: 'last_name',
                     },
                     content: {
                        placeholder: 'Last name',
                     },
                  },
               }
            },
            {
               componentName: 'SysInputComponent',
            },
            {
               componentName: 'SysTextAreaComponent',
            },
            {
               componentName: 'SysDropdownInputComponent',
            },
            {
               componentName: 'SysRadioGroupComponent',
            },
            {
               componentName: 'SysCheckboxListComponent',
            },
            {
               componentName: 'SysDateComponent',
            },
            {
               componentName: 'SysCalendarComponent',
            },
            {
               componentName: 'SysNetPromoterScoreComponent',
            },
            {
               componentName: 'SysFeedbackComponent',
            },
         ],
      },
      {
         label: 'Other',
         components: [
            {
               componentName: 'SysCountdownTimerComponent',
            },
            {
               componentName: 'SysSliderComponent',
            },
            {
               componentName: 'SysVideoComponent',
            },
            {
               componentName: 'SysConsentComponent',
            },
            {
               componentName: 'SysPromoCodeComponent',
            },
            {
               componentName: 'SysSocialComponent',
            },
         ],
      },
   ],
}