@hmiproject/helio-sdk
    Preparing search index...

    Type Alias CreateElementResult<Schema, Texts>

    type CreateElementResult<
        Schema extends PropsSchema,
        Texts extends TextsDef = TextsDef,
    > = {
        category?: string;
        Component: React.ComponentType<ClassPropsOf<Schema>>;
        defaultProps: DefaultElementProps<Schema>;
        description?: string;
        icon?: IconRef;
        id?: string;
        name: string;
        namespace: Namespace;
        propsGroups?: Record<string, PropsCategory>;
        propsSchema: Schema;
        texts?: CreateTextsResult<Texts>;
        traits: (string | TraitRef)[];
    }

    Type Parameters

    Index

    Properties

    category?: string

    Optional category for grouping this element in the HELIO IDE, such as in the Add Element dialog.

    Component: React.ComponentType<ClassPropsOf<Schema>>

    React component used to display this element.

    defaultProps: DefaultElementProps<Schema>

    Optional callback for creating default props.

    Can be used to instantiate other elements as children.

    description?: string

    Description of this element that will appear in the IDE

    icon?: IconRef

    Optional icon to identify this element in the HELIO IDE

    { name: 'Dinosaur' }
    
    id?: string

    Internal ID of the element. This uniquely identifies the element within the extension and should never change. If this property is omitted, the element will be referenced by its name.

    name: string

    Human-readable name of the element as it will appear in the HELIO IDE.

    Note: If no explicit id is provided, this value will also be used to create a unique id for the element.

    Changing the name in an extension update will break element references in existing projects.

    If you need to change the name, make sure to provide an id with the old name to ensure a smooth migration.

    {
    name: 'New Element Name',
    id: 'Old Element Name',
    // ...other `createElement` options...
    }
    namespace: Namespace
    propsGroups?: Record<string, PropsCategory>

    Optional configuration to group entries in propsSchema into different property groups in the IDE.

    Panel

    propsSchema: Schema

    Schema containing the properties this element accepts, created using the createPropsSchema function.

    Translation texts used in this element

    traits: (string | TraitRef)[]

    Element traits

    Traits control where an element can be used in the application and what properties it has. HELIO provides some standard traits that allow your elements to extend different parts of the library.