Table

Simple and sleek tables to clearly display your information.

Usage

Tables should be prefixed with the table class. This will give padding to the table and define borders, as well as making the borders collapsible.
Note: You can have any combination of the class below.

# Name Country City
1 Tim Davis England London
2 Chaem Choi Thailand Bangkok
3 Jose Mari Philippines Cebu
4 Andrea Scott Hungary Budapest
5 Stephanie Jones Australia Queensland
<table class="table">
    <thead>
        <tr>
            <th>#</th>
            <th>Name</th>
            <th>Country</th>
            <th>City</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>1</td>
            <td>Tim Davis</td>
            <td>England</td>
            <td>London</td>
        </tr>
        <tr>
            <td>2</td>
            <td>Chaem Choi</td>
            <td>Thailand</td>
            <td>Bangkok</td>
        </tr>
        <tr>
            <td>3</td>
            <td>Jose Mari</td>
            <td>Philippines</td>
            <td>Cebu</td>
        </tr>
        <tr>
            <td>4</td>
            <td>Andrea Scott</td>
            <td>Hungary</td>
            <td>Budapest</td>
        </tr>
        <tr>
            <td>5</td>
            <td>Stephanie Jones</td>
            <td>Australia</td>
            <td>Queensland</td>
        </tr>
    </tbody>
</table>Copy iconSuccess icon

Striped

To make every other table row a striped color, simply add the table-striped alongside the table, see below.

Something

# Name Country City
1 Tim Davis England London
2 Chaem Choi Thailand Bangkok
3 Jose Mari Philippines Cebu
4 Andrea Scott Hungary Budapest
5 Stephanie Jones Australia Queensland
<table class="table table-striped">
    <thead>
        <tr>
            <th>#</th>
            <th>Name</th>
            <th>Country</th>
            <th>City</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>1</td>
            <td>Tim Davis</td>
            <td>England</td>
            <td>London</td>
        </tr>
        <tr>
            <td>2</td>
            <td>Chaem Choi</td>
            <td>Thailand</td>
            <td>Bangkok</td>
        </tr>
        <tr>
            <td>3</td>
            <td>Jose Mari</td>
            <td>Philippines</td>
            <td>Cebu</td>
        </tr>
        <tr>
            <td>4</td>
            <td>Andrea Scott</td>
            <td>Hungary</td>
            <td>Budapest</td>
        </tr>
        <tr>
            <td>5</td>
            <td>Stephanie Jones</td>
            <td>Australia</td>
            <td>Queensland</td>
        </tr>
    </tbody>
</table>Copy iconSuccess icon

Hover

To create a hover effect on the table rows, just add the table-hover class alongside the table, see below.

Something

# Name Country City
1 Tim Davis England London
2 Chaem Choi Thailand Bangkok
3 Jose Mari Philippines Cebu
4 Andrea Scott Hungary Budapest
5 Stephanie Jones Australia Queensland
<table class="table table-hover">
    <thead>
        <tr>
            <th>#</th>
            <th>Name</th>
            <th>Country</th>
            <th>City</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>1</td>
            <td>Tim Davis</td>
            <td>England</td>
            <td>London</td>
        </tr>
        <tr>
            <td>2</td>
            <td>Chaem Choi</td>
            <td>Thailand</td>
            <td>Bangkok</td>
        </tr>
        <tr>
            <td>3</td>
            <td>Jose Mari</td>
            <td>Philippines</td>
            <td>Cebu</td>
        </tr>
        <tr>
            <td>4</td>
            <td>Andrea Scott</td>
            <td>Hungary</td>
            <td>Budapest</td>
        </tr>
        <tr>
            <td>5</td>
            <td>Stephanie Jones</td>
            <td>Australia</td>
            <td>Queensland</td>
        </tr>
    </tbody>
</table>Copy iconSuccess icon

Scroll

In order for the table to become responsive, or have an overflow-x: auto; property, wrap the table inside a div and add the table-scroll class.
This will prevent text wrapping and enable a scroll behaviour. Go ahead and resize the screen.

# Name Country City Zip Subscribed
1 Tim Davis England London TR4 2YT Yes
2 Chaem Choi Thailand Bangkok 10520 Yes
3 Jose Mari Philippines Cebu 24502 No
4 Andrea Scott Hungary Budapest 423001 No
5 Stephanie Jones Australia Queensland 292125 Yes
<div class="table-scroll">
    <table class="table table-hover">
        <thead>
            <tr>
                <th>#</th>
                <th>Name</th>
                <th>Country</th>
                <th>City</th>
                <th>Zip</th>
                <th>Subscribed</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>1</td>
                <td>Tim Davis</td>
                <td>England</td>
                <td>London</td>
                <td>TR4 2YT</td>
                <td>Yes</td>
            </tr>
            <tr>
                <td>2</td>
                <td>Chaem Choi</td>
                <td>Thailand</td>
                <td>Bangkok</td>
                <td>10520</td>
                <td>Yes</td>
            </tr>
            <tr>
                <td>3</td>
                <td>Jose Mari</td>
                <td>Philippines</td>
                <td>Cebu</td>
                <td>24502</td>
                <td>No</td>
            </tr>
            <tr>
                <td>4</td>
                <td>Andrea Scott</td>
                <td>Hungary</td>
                <td>Budapest</td>
                <td>423001</td>
                <td>No</td>
            </tr>
            <tr>
                <td>5</td>
                <td>Stephanie Jones</td>
                <td>Australia</td>
                <td>Queensland</td>
                <td>292125</td>
                <td>Yes</td>
            </tr>
        </tbody>
    </table>
</div>Copy iconSuccess icon

Icon

The possibilities are endless with the table component, you can use them in conjunction with any icons, see below for the full works.

# Name Country City Zip Actions
1 Tim Davis England London TR4 2YT
2 Chaem Choi Thailand Bangkok 10520
3 Jose Mari Philippines Cebu 24502
4 Andrea Scott Hungary Budapest 423001
5 Stephanie Jones Australia Queensland 292125
<div class="table-scroll">
    <table class="table table-striped table-hover">
        <thead>
            <tr>
                <th>#</th>
                <th>Name</th>
                <th>Country</th>
                <th>City</th>
                <th>Zip</th>
                <th class="center-text">Actions</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>1</td>
                <td>Tim Davis</td>
                <td>England</td>
                <td>London</td>
                <td>TR4 2YT</td>
                <td>
                    <div class="d-flex flex-nowrap justify-content-end">
                        <i class="fas fa-user-cog c-info mr-1"></i>
                        <i class="fas fa-pencil-alt c-success mr-1"></i>
                        <i class="fas fa-times c-danger"></i>
                    </div>
                </td>
            </tr>
            <tr>
                <td>2</td>
                <td>Chaem Choi</td>
                <td>Thailand</td>
                <td>Bangkok</td>
                <td>10520</td>
                <td>
                    <div class="d-flex flex-nowrap justify-content-end">
                        <i class="fas fa-user-cog c-info mr-1"></i>
                        <i class="fas fa-pencil-alt c-success mr-1"></i>
                        <i class="fas fa-times c-danger"></i>
                    </div>
                </td>
            </tr>
            <tr>
                <td>3</td>
                <td>Jose Mari</td>
                <td>Philippines</td>
                <td>Cebu</td>
                <td>24502</td>
                <td>
                    <div class="d-flex flex-nowrap justify-content-end">
                        <i class="fas fa-user-cog c-info mr-1"></i>
                        <i class="fas fa-pencil-alt c-success mr-1"></i>
                        <i class="fas fa-times c-danger"></i>
                    </div>
                </td>
            </tr>
            <tr>
                <td>4</td>
                <td>Andrea Scott</td>
                <td>Hungary</td>
                <td>Budapest</td>
                <td>423001</td>
                <td>
                    <div class="d-flex flex-nowrap justify-content-end">
                        <i class="fas fa-user-cog c-info mr-1"></i>
                        <i class="fas fa-pencil-alt c-success mr-1"></i>
                        <i class="fas fa-times c-danger"></i>
                    </div>
                </td>
            </tr>
            <tr>
                <td>5</td>
                <td>Stephanie Jones</td>
                <td>Australia</td>
                <td>Queensland</td>
                <td>292125</td>
                <td>
                    <div class="d-flex flex-nowrap justify-content-end">
                        <i class="fas fa-user-cog c-info mr-1"></i>
                        <i class="fas fa-pencil-alt c-success mr-1"></i>
                        <i class="fas fa-times c-danger"></i>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
</div>Copy iconSuccess icon

Variables

Manipulate the tables padding, colors and font sizes with the variables below.

Variable Value Description
$table-row-padding: 12px 32px 12px 0 !default;
Pixel/em/rem The padding amount of each row in a table in pixels, em's or rem's.
$table-border-color: #ddd !default;
CSS border property Border of the rows, header & footer via the use of a CSS property.
$table-striped-color: #f9f9f9 !default;
Color Color of the striped border table (even rows).
$table-hover-color: rgb(245, 245, 245) !default;
Color Coor of the hover row class.
$table-header-font-size: 1.1rem !default;
Pixel/em/rem Header font size of the table.
$table-row-font-size: 14px !default;
Pixel/em/rem Row font size of the table.