Chapter 10 Feedback
Empty state
What a list, table or page shows while it has nothing in it. It says what will appear here, why it is empty now, and offers the one action that fills it.
import { EmptyStateComponent } from '@okaapi-ui/angular';First use
Nothing has been made yet: name what goes here and give the action that makes the first one.
No orders yet
Orders show here as soon as a customer pays.
<ui-empty-state title="No orders yet">
<p>Orders show here as soon as a customer pays.</p>
<div ui-empty-state-actions>
<button ui-button>Share your menu</button>
</div>
</ui-empty-state>No results
A search or filter matched nothing: say so, and give the way back.
No orders match “Mohamed”
Check the spelling, or search by order number.
<ui-empty-state title="No orders match “Mohamed”">
<p>Check the spelling, or search by order number.</p>
<div ui-empty-state-actions>
<button ui-button variant="secondary">Clear search</button>
</div>
</ui-empty-state>In Arabic
لا توجد طلبات بعد
تظهر الطلبات هنا بمجرد أن يدفع العميل.
<ui-empty-state title="لا توجد طلبات بعد">
<p>تظهر الطلبات هنا بمجرد أن يدفع العميل.</p>
</ui-empty-state>When to use something else
Inputs
| Name | Type | Default | What it does |
|---|---|---|---|
title | string | — | Required. What is missing, as a heading. |
level | 2 | 3 | 4 | 3 | Heading level of the title, so it fits the page outline. |
[ui-empty-state-actions] | slot | — | The action that fills the space. One, usually. |
Keyboard and screen readers
- Its title is a heading, at the level you set so it fits the page outline.