Search.../

icon

Sets or gets the icon image displayed on the slideshow button.

Description

The icon property defines the vector image used as icon on the slideshow button.

Setting icon changes the slideshow button icon to the image indicated by the new value. Getting the icon property returns the location of the icon image file. To remove a slideshow button icon, set icon to null, undefined, or an empty string.

The following formats are supported:

  • Vector images from the Media Manager: wix:vector://v1/<vector_uri>/<filename>
  • Vector images from the web: http(s)://<vector image url>
  • Vector XML string: <svg>...</svg>

Note: Raster images are not supported by this property.

Type:

stringRead & Write

Was this helpful?

Set a slideshow button icon to a Media Manager image

Copy Code
1$w('#mySlideshowButton').icon = 'wix:vector://v1/ce0334_2cec984ab68c490891dda1b53a33fead.svg/my-vector-graphic.svg';
Set a slideshow button icon to an XML string

Copy Code
1$w('#mySlideshowButton').icon = '<svg height="10" width="10"><polygon points="0,9 9,9 5,0" style="fill:lime;stroke:purple;stroke-width:1"/></svg>';
Delete a slideshow button icon

Copy Code
1$w('#mySlideshowButton').icon = '';
Get a slideshow button icon

Copy Code
1const iconLocation = $w('#mySlideshowButton').icon;
2// 'wix:vector://v1/ce0334_2cec984ab68c490891dda1b53a33fead.svg/my-vector-graphic.svg'
Change the slideshow button icon when clicked

Copy Code
1$w('#mySlideshowButton').onClick((event) => {
2 $w('#mySlideshowButton').icon = 'wix:vector://v1/ce0334_2cec984ab68c490891dda1b53a33fead.svg/my-vector-graphic.svg';
3});