type

an object that specifies items presentation

object|string type;

Example

list = webix.ui({
    view:"list",
    type:{
        height:50
    }
});


Default value:

"sideBar"

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