type

an object that specifies items presentation

object|string type;

Example

webix.ui({
    view:"menu",
    type:{
        subsign:true
    },
    ..//config
});

Related samples

Details

Attributes of the type as object:

  • css - (string) the name of a css class that will be applied to component items.
  • height - (number) the height of an item in the component.
  • template - (function, string) an HTML template that will define item presentation in the component.
  • width - (number) the width of the items list.
  • subsign - (boolean) - for menu: if true shows an array of menu items that feature a submenu.

Named type

It is possible to create a type object separately and then refer to it by its name:

webix.type(webix.ui.dataview,{
    name:"typeA",
    width: 260,
    height: 90
});
 
webix.ui({
    view:"dataview",
    type:"typeA"
});

Related sample:  Named Templates

More information about Type Implementation can be found in a separate article of the main documentation.

See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix mvc library and page of javascript menu library product.