Ink provides a way to give styling and interaction to tabular data, without interfering with the HTML table element default behaviour.
CSS CLASSES
Class name
Description
ink-table
The table root class.
alternating
Sets a darker darker background color on odd number rows.
hover
Highlights table rows when the mouse pointer hovers a row.
bordered
Applies borders to all table cells.
red green blue orange grey black yellow
Sets a background color on a table row
: This class must be used for the tables to work.
Usage
Css classes:
ink-table
To add Inks style rules to your tables, begin by adding the ink-table css class to your table elements:
This will result in a table that gets our default table style, that looks like this:
Example
ID
Name
1
John
2
Will
3
Steve
As you can see, by default table headings have centered text, so if you wish to change the text alignment you can use on of our content alignment css classes:
Resulting in:
Example
ID
Name
1
John
2
Will
3
Steve
Alternating row colors
Css classes:
alternating
Adding the alternating css class to your table will add a darker background color to every odd numbered row. This can be useful to distinguish between rows, in large and, or complex tables.
Like so:
Example
ID
Name
1
John
2
Will
3
Steve
Highlighting table rows
Css classes:
hover
Adding the hover css class to the table will cause table rows to be highlighted with a background color when hovered. Mouse pointer is set to the hand pointer.
Example
ID
Name
1
John
2
Will
3
Steve
Borders
Css classes:
bordered
The bordered class adds borders around all table cells, headings and footers.
Example
ID
Name
1
John
2
Will
3
Steve
Row colors
Css classes:
red
green
blue
orange
grey
black
yellow
You can use one of Inks base colors as the background for a table row by adding one of the above classes:
Example
ID
Name
1
John
2
Will
3
Steve
Combining multiple styles
Css classes:
red
green
blue
orange
grey
black
yellow
If necessary, you can combine all of the above options: