ImageUI

Implements the display of an image based on that image’s URL.

Parameters

  • urlSource: StringF | string[] – a string, a function that returns a string, or an array of strings. For a string or function that returns a string, this should be a URL of an image to be displayed. The image will be displayed full width according to whatever layout is applied in the style. If an array of strings is returned, each must be a URL for an image. ZUI will randomly select one of the URLs each time the page is refreshed.

Attributes

none

Examples

new ImageUI("/image/flyingPigs.jpg");
new ImageUI(()=>{
     switch(this.kind){
         pig: return "/image/pig.jpg";
         dog: return "/image/dog.jpg";
         default: return "/image/chicken.jpg";
     }
})
new ImageUI([
     "/img/promo_1.jpg",
     "/img/promo_2.png",
     "/img/promo_3.png"  
]);

Styling

  • ImageUI – default style class