Sample Property Definitions

When building custom components, you can make use of the Component Manager props to make your custom component configurable in the UI Designer. Below you can find some sample property definition that you can adopt in your custom component.

Common Properties

export interface BaseProp {
  category?: string;
  helpText?: ((item: RequiredItem<never>) => string) | string;
  hidden?: boolean;
  label: string;
  preventMultiEdit?: boolean;
  required?:
    | ((item: RequiredItem<never>, context: PropertyContext) => boolean)
    | boolean;
  type: string;
}

Text

{
  label: "Gap",
  type: "string",
  placeholder: "e.g. 8px",
  helpText: "The flex gap to be added between the child components. e.g. 8px", // markdown can be used here
  category: "Flex",
  required: true
}

Dynamic help text sample

Number (slider)

Boolean

Boolean Expression

Expression

Color Expression

Select

Use toOptions function to auto create display labels based on the value

import { toOptions } from 'cloudio';

Manually specify both value & display labels

View Attribute Chooser

Margin

Controller Function

DataSource Alias Chooser

Attribute Chooser

Options

Last updated

Was this helpful?