XUI Core Objects

The XUI module comes with several HTML wrapper objects:

XView #

Xpell View (Xview) is a basic element that can be used to store content and to hold child objects.

AttributesValueExample
_typeview / div{   
_id:"my-view",   
_type:"view",   
_text:"Hello World"
}
_html_tagDiv

XHTML #

A xpell wrapper for any HTMl element

AttributesValueExample
_typexhtml{   
_id:"my-div",   
_type:"xhtml",   
_html_tag:"span",   
_text:"Hello World"
}
_html_tag*(any valid HTML tag)

#

XLabel #

A xpell wrapper HTML Label element

AttributesValueExample
_typelabel{   
_id:"my-label",   
_type:"label",   
_text:"Caption"
}
_html_taglabel

XLink #

A xpell wrapper HTML link element

AttributesValueExample
_typelink{      
_id: "my-link",      
_type: "link",      
_text:"github.com",     href:"https://github.com"
}
_html_taga

#

XButton #

A xpell wrapper HTML Button element

AttributesValueExample
_typebutton{   
_id:"my-button",   
_type:"button",   
_text:"Click",   
_on_click:(btn,event) => {       
console.log("Clicked")  btn._text = "Thanks"   
}
}
_html_tagButton

XTextField #

A xpell wrapper HTML input element

AttributesValueExample
_typetextField{   
_id:"my-text",   
_type:"text",   
_on:{       
"keyup": (obj,event) => {           
console.log(obj.dom.value)       
}}}
_html_tagInput

XPassword #

A xpell wrapper HTML password input element

AttributesValueExample
_typepasword{   
_id:"my-text",   
_type:"text",   
_on:{       "keyup": (obj,event) => {           
console.log(obj.dom.value)       
}}}
_html_taginput

XInput #

A xpell wrapper HTML input element

AttributesValueExample
_typeinput{   
_id:"my-text",   
_type:"text",   
_on:{       
"keyup": (obj,event) => {           
console.log(obj.dom.value)       
}}}
_html_taginput

XTextArea   #

A xpell wrapper HTML textArea element

AttributesValueExample
_typetextarea{      
_id: "my-textarea",      
_type: "textarea"
}
_html_tagtextarea

XVideo   #

A xpell wrapper HTML video element

AttributesValueExample
_typetextarea{      
_id: "my-video",      
_type: "video",      
src:"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
}
_html_tagInput

XImage   #

A xpell wrapper HTML image element

AttributesValueExample
_typeimage{      
_id: "my-image",      
_type: "image",      
src: "https://picsum.photos/200/300"
}
_html_tagimg

XList   #

A xpell wrapper HTML list element

AttributesValueExample
_typelist{
_id: "my-list",
_type: "list",
_items: [        
{ id: "item1", _text: "Item 1" },        
{ id: "item2", _text: "Item 2" }     
]
}
_html_tagul

XForm   #

A xpell wrapper HTML form element

AttributesValueExample
_typeform {      
_id: "my-form",      
_type: "form",      
_text: "Name",      
_children:[
{          
_id: "my-lable"
_type:"label",          
_text: "Name"
}]}
_html_taginput

XWebcam   #

A xpell wrapper HTML webcam element

AttributesValueExample
_typeform {        
_id : "my-webcam",
_type : "webcam"
}
_html_tagvideo

XSVG  #

A xpell wrapper HTML svg element

AttributesValueExample
_typesvg{       
_id: "my-svg",        
_type: "image",        
src: 'image address needs to end with'.SVG},
_html_tagsvg

        

Updated on December 5, 2024
Skip to content