Simple table component for displaying tabular data.
This is the default state of the table component. Borders are used to cleary seperate rows, whilst a hover effect makes focusing on a particular row easier on the eyes.
Account | Due Date | Amount |
---|---|---|
Visa - 3412 | 04/01/2016 | £1,190 |
Visa - 6076 | 03/01/2016 | £2,443 |
Visa - 1237 | 07/01/2016 | £1,181 |
By default, all table columns have equal width, however using width utility classes, you can resize individual columns, with the remainder filling the available space automatically.
Account | Due Date | Amount |
---|---|---|
Visa - 3412 | 04/01/2016 | £1,190 |
Visa - 6076 | 03/01/2016 | £2,443 |
Visa - 1237 | 07/01/2016 | £1,181 |
A list of modifiers for the table component, allowing you to change its appearance to fit a variety of roles and scenarios.
Modifiers can typically be combined to achieve the desired appearance, unless stated otherwise.
Using this modifier removes the outer borders of the table. Use if your table is placed right up to the edges of its parent component to avoid a double border. A practical example can be found by clicking the "Open Modal" button.
Account | Due Date | Amount |
---|---|---|
Visa - 3412 | 04/01/2016 | £1,190 |
Visa - 6076 | 03/01/2016 | £2,443 |
Visa - 1237 | 07/01/2016 | £1,181 |
Account | Due Date | Amount |
---|---|---|
Visa - 3412 | 04/01/2016 | £1,190 |
Visa - 6076 | 03/01/2016 | £2,443 |
Visa - 1237 | 07/01/2016 | £1,181 |
This modifier collapses the table into a single column until the specified breakpoint is hit. This should be used to make the table readable on smaller screens. Please note, you need to add a data-table-label
attribute to each cell referencing the column it belongs to. This makes sure it's correctly labelled in its collapsed state.
Also, if you add a c-table__full-width-label
class to one of your data-table-label
<td>
elements or c-table--full-width-labels
to the component base, labels and contents will stack vertically when in collapsed state. This is useful when dealing with long labels or large content to make sure they don't overlay.
Account | Due Date | Amount |
---|---|---|
Visa - 3412 | 04/01/2016 | £1,190 |
Visa - 1237 | 07/01/2016 | £1,181 |
Account | Due Date | Amount |
---|---|---|
Visa - 3412 | 04/01/2016 | £1,190 |
Visa - 1237 | 07/01/2016 | £1,181 |
Default Center Vertical Alignment | |
---|---|
Center (Default) | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam dictum turpis id leo fringilla, at maximus purus ullamcorper. In hac habitasse platea dictumst. |
Top Vertical Alignment | |
---|---|
Top | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam dictum turpis id leo fringilla, at maximus purus ullamcorper. In hac habitasse platea dictumst. |
A smaller version of the table with reduced cell padding.
Standard Table | ||
---|---|---|
Account | Due Date | Amount |
Visa - 3412 | 04/01/2016 | £1,190 |
Visa - 6076 | 03/01/2016 | £2,443 |
Visa - 1237 | 07/01/2016 | £1,181 |
Small Table | ||
---|---|---|
Account | Due Date | Amount |
Visa - 3412 | 04/01/2016 | £1,190 |
Visa - 6076 | 03/01/2016 | £2,443 |
Visa - 1237 | 07/01/2016 | £1,181 |
You can theme the table component to make it fit your brand. For more information on theming EvoToolkit, please see Configuring EvoToolkit.
Below is a list of theme variables and their default values.
Theme Variables | Default |
---|---|
$component-table-border-color |
light |
$component-table-row-hover-color |
very-light |
$component-table-header-background-color |
very-light |
$component-table-collapse-even-row-color |
very-light |