Empty State
Empty State
The goal of a empty state pattern is to provide a good first impression that helps users to achieve their goals. It should be used when a view is empty because no objects exist and you want to guide the user to perform specific actions. This may occur because the application is newly installed and content has not yet been created or added. This state may also result when all objects are deleted from a collection.
This pattern should NOT be used when:
- Selected filters cause an empty result. See Filter for guidance on this use case.
- There is a connectivity issue and the data set cannot be obtained.
The empty state pattern is most often used in conjunction with one of the content views (e.g. List View, Table View, and Card View).
Empty State
Description
- Icon (optional): If an object icon is associated with this view, it can be displayed here.
- Empty State Title: Give it a name.
- Text (optional): This text should be personal and helpful. It should minimize the user’s effort to complete tasks.
- Primary Action Button: The primary action is displayed as a prominent blue button. See the Action Labels section for more information about terminology and wording specific to action labels.
- Secondary Action Buttons (optional): Secondary actions are alternative options for the user. They are shown as more subtle gray buttons and located below the main action. There can be more than one secondary action. Here are some additional variants for displaying secondary actions:
-
In the case of differing action label lengths, set a consistent button width based on the longest action label.
-
If there are more than 3 secondary actions, we recommend using text links in place of buttons.
PatternFly Core Example
Example
Empty State Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Learn more about this in the documentation.
<div class="blank-slate-pf " id=""> <div class="blank-slate-pf-icon"> <span class="pficon pficon pficon-add-circle-o"></span> </div> <h1> Empty State Title </h1> <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p> <p> Learn more about this <a href="#">in the documentation</a>. </p> <div class="blank-slate-pf-main-action"> <button class="btn btn-primary btn-lg"> Main Action </button> </div> <div class="blank-slate-pf-secondary-action"> <button class="btn btn-default">Secondary Action</button> <button class="btn btn-default">Secondary Action</button> </div> </div>