Basic data table
Column headers
- 12sp Roboto Medium
- 54% black
Table content
- 13sp Roboto Regular
- 87% black
Text alignment
- Right-align numeric columns
- Left-align text columns
출처 : http://www.google.com/design/spec/components/data-tables.html
Basic data table
Column headers
Table content
Text alignment
Display a background fill when the user hovers over any part of a row. If there are separate hover states on individual (e.g. editable) cells, display both the hover state of the cell and row at the same time.
Hover background
Hovering over a row
When a row is selected, use a background fill on the row.
Selected row background
Checkbox
A selected table row
If column sorting is enabled, sort the most important data by default and display a sorted state in the column header. If the user clicks on a column that is already sorted, reverse the sort order and rotate the sort icon.
Sorted column name
Sort icon
Table with an ascending sorted column
If there is a need to provide definitions to column headers, display a tooltip on hover. If sorting is enabled, display a light sort icon upon hover, which indicates that the column is sortable.
Tooltip
Sort icon
Hovering over a column name
Sometimes, column names don’t fit in a container with the recommended 56dp of padding in between columns. There are two options to handle this:
Long column names truncated with an ellipse
Hovering over a truncated column name
Tables may require basic text editing (e.g. for editing existing text content, or adding comments). Include editable fields within a table and denote them using placeholder text. You can use a simple edit dialog with just a text field, or display a full dialog component on click.
Placeholder text
Small edit dialog
A simple, one-field edit dialog
Large edit dialog
A complex, flexible edit dialog
Inline edit icon
(Optional) Icon-based edit affordance. Include icons at the edge of the cell on the opposite side of the content.
Instead of editing text, users may need to select from a predefined list of options. In this scenario, embed a menu component directly in the table.
Inline menu
A table with inline menus
An expanded inline menu