Tables
Striped Table
Title |
Title |
Title |
Title |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
= ui.nfg :table, :striped do
= render partial: 'elements/tables/table_body', locals: { lots_of_data: false }
<table class="table table-striped">
<thead>
<tr>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
</tr>
</thead>
<tbody>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
</tbody>
</table>
Bordered Table
Note: "borderless" is not the opposite of a bordered table. Bordered, when false, adds no modifier class to the table.
Title |
Title |
Title |
Title |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
= ui.nfg :table, :bordered do
= render partial: 'elements/tables/table_body', locals: { lots_of_data: false }
Title |
Title |
Title |
Title |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
<h1>Tables</h1>
<h3>Striped Table</h3>
<table class="table table-striped">
<thead>
<tr>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
</tr>
</thead>
<tbody>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
</tbody>
</table>
<div class='row'>
<div class='col-md-6'>
<pre><code>= ui.nfg :table, :striped do
 = render partial: 'elements/tables/table_body', locals: { lots_of_data: false }</code></pre>
</div>
<div class='col-md-6'>
<pre><code><table class="table table-striped">
<thead>
<tr>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
</tr>
</thead>
<tbody>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
</tbody>
</table></code></pre>
</div>
</div>
<hr>
<h3>Bordered Table</h3>
<p>Note: "borderless" is not the opposite of a bordered table. Bordered, when false, adds no modifier class to the table.</p>
<table class="table table-bordered">
<thead>
<tr>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
</tr>
</thead>
<tbody>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
</tbody>
</table>
<div class='row'>
<div class='col-md-6'>
<pre><code>= ui.nfg :table, :bordered do
 = render partial: 'elements/tables/table_body', locals: { lots_of_data: false }</code></pre>
</div>
<div class='col-md-6'>
<pre><code>
<table class="table table-bordered">
<thead>
<tr>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
</tr>
</thead>
<tbody>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
</tbody>
</table>
Responsive Tables
<< Scroll left and right to see all data >>
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
= ui.nfg :table, :responsive do
= render partial: 'elements/tables/table_body', locals: { lots_of_data: true }
<p class="mb-1 text-right text-muted font-size-sm"><< Scroll left and right to see all data >></p>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
</tr>
</thead>
<tbody>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
</tbody>
</table>
</div>
Responsive Table with custom caption:
caption: 'Custom caption'
Custom caption
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
= ui.nfg :table, :responsive, caption: 'Custom caption' do
= render partial: 'elements/tables/table_body', locals: { lots_of_data: true }
<p class="mb-1 text-right text-muted font-size-sm">Custom caption</p>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
</tr>
</thead>
<tbody>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
</tbody>
</table>
</div>
Responsive Table with caption turned off:
caption: nil || false
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
Title |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
= ui.nfg :table, :responsive, caption: nil do
= render partial: 'elements/tables/table_body', locals: { lots_of_data: true }
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
</tr>
</thead>
<tbody>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
</tbody>
</table>
</div>
Sizable tables
Tables are either their default size or made `:sm`
Title |
Title |
Title |
Title |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
This is information |
= ui.nfg :table, :sm do
= render partial: 'elements/tables/table_body', locals: { lots_of_data: false }
<table class="table table-sm">
<thead>
<tr>
<th>Title</th>
<th>Title</th>
<th>Title</th>
<th>Title</th>
</tr>
</thead>
<tbody>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
<tr>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
<td>This is information</td>
</tr>
</tbody>
</table>