Empty State¶
Author | Nekhelesh Ramananthan | |
License | BSD License | |
Contact | nik90@ubuntu.com | |
Framework | ubuntu-sdk-14.10 |
This widget provides a standardized way to show an empty state (approved by Canonical designers) to improve the user experience and avoid showing a blank page. This way the user is not left starring a blank page but instead is shown the empty state which informs the user of situation along with some recommendations.
For instance, in the clock app if the user has no alarms saved, then an empty state is shown and encourages the user to create a new alarm.
Example:
EmptyState {
iconName: "alarm-clock"
title: i18n.tr("No saved alarms")
subTitle: i18n.tr("Tap the + icon to add an alarm")
anchors.centerIn: parent
}
Property Documentation¶
iconName¶
The name of the icon to display. Valid icon names can be found in the suru-icon-theme.
Note
If both iconName and iconSource are specified, then iconName will be ignored.
title¶
The main message of the empty state. Try to keep this short and precise.
subTitle¶
A more descriptive message of the empty state. Usually the subtitle provides tips or instructions to perform an action to avoid the empty state.