placeholders
The placeholders property can be added to the root YAML of any jig-type to define what displays when a screen has no data. It appears automatically for empty screens and is fully customizable. Configure your own text, description, icon, or choose from a set of built-in animated icons to create a more engaging user experience.
Configuration options
icon
The icon is shown above the title. You can use any supported icon name or animated placeholder icons to visually reinforce the message. The list of animated icons displays when you use IntelliSense, and include:
helicopter
is-offline
loading-data
missing-data
oil-drop
scan-qr
title
The main heading displayed in the placeholder. Use this to briefly explain the empty state (e.g., No data to display).
when
An expression that determines when this placeholder should be displayed. The placeholder will only render when this condition evaluates to true.
description
Additional text that provides more context or guidance to the user about why no data is available or what action to take next.
onPress
Defines an action or list of actions to run when the placeholder's action button is pressed. Useful for prompting a retry, refresh, upload data, or navigate to another screen.
Considerations
For screens that rely on array-based data (such as lists or dropdown components), a default placeholder is shown automatically when no data is returned. You can override or customize this behavior by defining your own placeholder property.
You can configure multiple placeholders within a single jig, but only one will display at a time. Use the
whenproperty to define the conditions that determine which placeholder should appear.
Examples and code snippets
Default placeholder in a list

In this example, the list has no data, so a default placeholder is shown automatically. No custom placeholder is configured. The default placeholder is applied to any jig/component configured with array-based data (e.g. list, dropdown).
title: Product Review (Placeholder default)
description: List rating with value and icon
type: jig.list
icon: contact
header:
type: component.jig-header
options:
height: medium
children:
type: component.image
options:
source:
uri: https://plus.unsplash.com/premium_photo-1682309642428-3f8b37637434?w=900&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NXx8cmF0aW5nc3xlbnwwfHwwfHx8MA%3D%3D
data: =@ctx.datasources.product-review
item:
type: component.list-item
options:
title: =@ctx.current.item.title
subtitle: =@ctx.current.item.subtitle
avatars: =@ctx.datasources.product-users[product =
@ctx.current.item.id].{"text":text,"uri":avatars}[]
description: =@ctx.current.item.thirdLine
isContained: true
label:
title: =@ctx.current.item.label
leftElement:
element: avatar
text: ""
uri: =@ctx.current.item.productImage
rating:
value: =@ctx.current.item.rating
ratingIcon:
color: color3
current: =@ctx.current.item.ratingValue
icon: rating-star-1
maximum: 5
Customized placeholder in a list
In this example, the list has no data, so a customized placeholder is displayed. The placeholder includes a title and icon relevant to the screen’s context. A description provides additional guidance, prompting the user to add a review. An onPress action is configured with a go-to action that opens the review form as a modal, allowing the user to submit a new review.

Placeholder in a gallery

In this example, the gallery jig has no images to display. A placeholder is configured with a title and an icon that match the screen’s purpose. The description offers helpful guidance by prompting the user to upload photos. An onPress action is included, using the open-media-picker action to let the user add images directly.
Placeholder (animated) in a tabs jig
In this example, a work dashboard is configured with three tabs. The first tab displays all scheduled appointments for the day. If no appointments are scheduled, a customised placeholder is shown, featuring an animated icon and a helpful description. The description suggests that the field worker use the day for equipment maintenance and stock-taking.

Placeholders in a bottomSheet

In this example, the placeholder is configured to display only when a specific condition is met, in this case, when the current day is Monday. The when expression evaluates the day of the week, and if it matches Monday, the placeholder appears. On any other day, the placeholder is hidden, and users will instead see the available options for selection.
Last updated
Was this helpful?