Chapter 11 Data
Property list
Label and value pairs, such as the details of one order. Built on the native description list, so screen readers say how many items there are and pair each label with its value.
import { PropertyComponent, PropertyListComponent } from '@okaapi-ui/angular';Order details
Two columns when there is room. Make the box narrow and each label goes above its value.
- Order
- #1042
- Status
Paid - Customer
- Hatem Mohamed
- Delivery
- 14 Tahrir Street, Dokki, Giza
- Total
- EGP 370
<dl ui-property-list>
<div ui-property term="Order">#1042</div>
<div ui-property term="Status"><ui-badge variant="success">Paid</ui-badge></div>
<div ui-property term="Customer">Hatem Mohamed</div>
<div ui-property term="Delivery">14 Tahrir Street, Dokki, Giza</div>
<div ui-property term="Total">EGP 370</div>
</dl>Stacked, in Arabic
- الطلب
- ١٠٤٢
- الإجمالي
- ٣٧٠ جنيه
<dl ui-property-list layout="stacked">
<div ui-property term="الطلب">١٠٤٢</div>
<div ui-property term="الإجمالي">٣٧٠ جنيه</div>
</dl>When to use something else
| If you need | Use |
|---|---|
| Many records with the same fields | Data table |
| One headline number | Stat |
| Values the reader edits | Text field and the other form fields |
Inputs
| Name | Type | Default | What it does |
|---|---|---|---|
layout | 'columns' | 'stacked' | 'columns' | On dl[ui-property-list]. Stacked puts each label above its value at any width. |
term | string | — | On div[ui-property], required: the label. Its content is the value. |
Keyboard and screen readers
- The native description list, so each label is paired with its value.