Menu

Table

A table organizes and displays information in rows and columns.

Minimum requirements
  • 2 rows (tr)
  • 3 columns (th and/or td)

Quick access

Advanced settings

Presets

?

Variations

?

Modifiers

?

Lorem ipsum dolor sit amet
Lorem ipsum Lorem ipsum Lorem ipsum
Lorem ipsum Lorem ipsum Lorem ipsum
Lorem ipsum Lorem ipsum Lorem ipsum
* Lorem ipsum dolor sit amet.

Lorem ipsum dolor sit amet
Lorem ipsum Lorem ipsum Lorem ipsum
Lorem ipsum Lorem ipsum Lorem ipsum
Lorem ipsum Lorem ipsum Lorem ipsum
* Lorem ipsum dolor sit amet.

Lorem ipsum Lorem ipsum Lorem ipsum
Lorem ipsum Lorem ipsum Lorem ipsum
Lorem ipsum Lorem ipsum Lorem ipsum
* Lorem ipsum dolor sit amet.

HTML
Copy to clipboard

Details

Usage

The table component is used to list information from a data set in a two-dimensional grid so that the data correlation is understandable by the user.

Guidelines

  1. You can use the attributes colspan and rowspan to merge cells
  2. Character limits (including spaces):
    • 75 characters for the title (.title)

HTML structure

Overall HTML view of a table component:

HTML file (.html)
(other component(s))
div.table
div.header (optional)
div.title
div.wrapper
table
thead (optional)
tr (one or more)
th (one or more)
td (one or more)
tbody
tr (one or more)
th (one or more)
td (one or more)
tfoot (optional)
tr (one or more)
td (one or more)
(other component(s))

Presets

Table presets:

PresetDescription
DefaultDefault preset.
SortableWhenever you want to make the table sortable. An additional class should be added to the th.
BasicWhenever a header is not available.

Presets are ready to use HTML structures.

Variations

Table variations:

VariationDescription
DefaultThis snippet is composed of a header and a table of three columns and three rows.
SortableThis snippet is composed of a header and a sortable table of three columns and three rows. The table header needs to have an additional class (sort).
BasicThis snippet is solely composed of a table of three columns and three rows.

Modifiers

Table classes:

ClassDescription
-align-centerAligns cell values to the center.
-no-space-belowRemoves margin bottom from the component container.
-zebra-columnsMakes odd columns white (th cells are exluded).

To enable a modifier, add it as a class to the outermost element of this component.

Embedding

The table component can be embedded inside other component:

ComponentDescription
AccordionWhenever you need to embed a table in an accordion.
SectionWhenever you need to embed a table in a section.
main (HTML file)
(component, one of the above list)
div.table (element)

Some components can be placed/embedded inside other components. Whenever this happens, they become elements of the respective parent component and they can no longer be called components.

Nesting

The table component cannot be used as a container of other components and/or elements.

main (HTML file)
div.table
(Element)