QlikWorld 2020 Global Conference. Join us to discover how to get the most from your data. Act fast. Register now and save.

Media property definition

This API is under development. Do not rely on it. It may change or be removed in future versions.


The media definition property template can be used to add a custom property of media type. When defining a media property, the following fields can be used:


This field is mandatory for media.

Should always be defined as string for media items

Note: The media effect is achieved by defining the component field to "media", see below.


Used for defining the label of the item.


Used for defining how the property is visualized in the property panel. Used to override the default component that comes with the type setting.

This field is mandatory for a link property and should always be "media".


Name or ID used to reference a property.


Name or ID used to reference the layout.

Note: Adding media from the In app media library is not supported in this release.


Defining a custom media property

Defining a custom property of media type can look like below.


Note: Customization of properties always start with items:.
define( [
function ( ) {

	return {
		definition : {
			type : "items",
			component : "accordion",
			items: {
				settings: {
					uses: "settings",
					items: {
						MyMedia: {
							label:"My media",
							component: "media",
							ref: "myMedia",
							layoutRef: "myMedia",
							type: "string"
		paint: function ($element, layout) {
			//add your rendering code here
			$element.css("background","url("+layout.myMedia+") no-repeat left top fixed");
			$element.html( "props-media "+layout.myMedia );

} );

This is what it looks like in the property panel

This is what it may look like after selecting to display an image

And this is what the visualization itself may look like after selecting to display an image

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?