Skip to content

Tables & datatables

They are used to organize and display structured information in rows and columns, enabling users to scan, compare, and analyze data efficiently.

When tables handle large datasets and include features such as sorting, filtering or lazy loading, they are considered datatables.

Usage

Element covers three different implementations, each suited to different levels of complexity and scale:

  • HTML table: simple, static, HTML-based tables.
  • NGX-datatable: datatable for medium to large datasets, with built-in features like sorting and filtering.
  • AG Grid: advanced datatable for complex, enterprise scenarios, with extensive functionality (paid license required).

When to use

  • To view or process a large amount of information at once.
  • To make it easy to compare data points between rows or columns.
  • When data is easy to understand in a flat hierarchy.

Best practices

  • Order rows intuitively.
  • Minimize the number of columns.
  • Keep column headers short. Use concise labels for clarity.
  • Shorten data to make scanning easier.
  • Left-align text and right-align numeric values. Don’t use center alignment.
  • Use hyphen (-) to represent empty values.
  • Use empty state to represent an empty table.
  • Don't use expandable rows with more than 1 level.
  • When possible, avoid repeating the title in every cell of a given column.
  • Use skeleton to represent the loading state.

Except where otherwise noted, content on this site is licensed under MIT License.