mirror of
https://github.com/hunvreus/basecoat.git
synced 2026-11-18 07:58:20 +00:00
154 lines
3.0 KiB
Plaintext
154 lines
3.0 KiB
Plaintext
# Table
|
|
|
|
<Preview class="w-full">
|
|
<div class="table-container">
|
|
<table class="table">
|
|
<caption>A list of your recent invoices.</caption>
|
|
<thead>
|
|
<tr>
|
|
<th>Invoice</th>
|
|
<th>Status</th>
|
|
<th>Method</th>
|
|
<th>Amount</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td class="font-medium">INV001</td>
|
|
<td>Paid</td>
|
|
<td>Credit Card</td>
|
|
<td class="text-end">$250.00</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="font-medium">INV002</td>
|
|
<td>Pending</td>
|
|
<td>PayPal</td>
|
|
<td class="text-end">$150.00</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="font-medium">INV003</td>
|
|
<td>Unpaid</td>
|
|
<td>Bank Transfer</td>
|
|
<td class="text-end">$350.00</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="font-medium">INV004</td>
|
|
<td>Paid</td>
|
|
<td>Paypal</td>
|
|
<td class="text-end">$450.00</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="font-medium">INV005</td>
|
|
<td>Paid</td>
|
|
<td>Credit Card</td>
|
|
<td class="text-end">$550.00</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="font-medium">INV006</td>
|
|
<td>Pending</td>
|
|
<td>Bank Transfer</td>
|
|
<td class="text-end">$200.00</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="font-medium">INV007</td>
|
|
<td>Unpaid</td>
|
|
<td>Credit Card</td>
|
|
<td class="text-end">$300.00</td>
|
|
</tr>
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="3">Total</td>
|
|
<td class="text-end">$2,500.00</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
</Preview>
|
|
|
|
## Usage
|
|
|
|
Add the `table` class to your table element. Wrap it in `table-container` when horizontal scrolling is needed.
|
|
|
|
```html
|
|
<div class="table-container">
|
|
<table class="table">
|
|
<!-- Content of your table -->
|
|
</table>
|
|
</div>
|
|
```
|
|
|
|
## Examples
|
|
|
|
### Footer
|
|
|
|
<Preview class="w-full">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Invoice</th>
|
|
<th class="text-end">Amount</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>INV001</td>
|
|
<td class="text-end">$250.00</td>
|
|
</tr>
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td>Total</td>
|
|
<td class="text-end">$250.00</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</Preview>
|
|
|
|
### Actions
|
|
|
|
<Preview class="w-full">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th class="text-end">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td class="font-medium">Project Alpha</td>
|
|
<td class="text-end">
|
|
<button type="button" class="btn-xs-outline">Open</button>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</Preview>
|
|
|
|
### RTL
|
|
|
|
Set `dir="rtl"` on the table container when needed. Use logical alignment utilities such as `text-end`.
|
|
|
|
<Preview class="w-full">
|
|
<div class="table-container" dir="rtl">
|
|
<table class="table">
|
|
<caption>قائمة الفواتير الأخيرة.</caption>
|
|
<thead>
|
|
<tr>
|
|
<th>الفاتورة</th>
|
|
<th>الحالة</th>
|
|
<th class="text-end">المبلغ</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td class="font-medium">INV001</td>
|
|
<td>مدفوعة</td>
|
|
<td class="text-end">$250.00</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</Preview>
|