menu
Data table
person
code Github

Data table

You can simply add the class .data-table to a table and the styling will be applied. If you would like each row to have a hover you can add the class .data-table--hover to the table as well.

Header Text column Number column
Row item 1 Row data 1 1.1
Row item 2 Row data 2 2.2
Row item 3 Row data 3 3.3
Row item 4 Row data 4 4.4
    
<table class="data-table data-table--hover">
    <thead>
    <tr>
        <th>Header</th>
        <th>Text column</th>
        <th class="xs__text--right">Number column</th>
    </tr>
    </thead>

    <tbody>
    <tr>
        <td>Row item 1</td>
        <td>Row data 1</td>
        <td class="xs__text--right">1.1</td>
    </tr>
    <tr>
        <td>Row item 2</td>
        <td>Row data 2</td>
        <td class="xs__text--right">2.2</td>
    </tr>
    </tbody>
</table>
    

Settings

Scss CSS Result
$data-table__header-font-size --data-table__header-font-size Change data table header font size
$data-table__header-color --data-table__header-color Change data table header color
$data-table__header-font-weight --data-table__header-font-weight Change data table header font weight
$data-table__header--hover-color --data-table__header--hover-color Change data table header hover color
$data-table__body-color --data-table__body-color Change data table body color
$data-table__body-font-size --data-table__body-font-size Change data table body font size
$data-table__row-height --data-table__row-height Change data table row height
$data-table__row-border-bottom --data-table__row-border-bottom Change data table row border bottom
$data-table__row__icon-size --data-table__row__icon-size Change data table row icon size
$data-table__row--hover-background --data-table__row--hover-background Change data table row hover background