Components/Table

fd-table · 25 examples from SAP's documentation · Back to the gallery

About

A table contains a set of line items and usually comprises rows (with each row showing one line item) and columns. Line items can contain data of any kind, but also interactive elements, for example, for editing the data, navigating, or triggering actions relating to the line item. To display large amounts of data in tabular form, several table components are provided. These are divided into two groups, each of which is defined by a consistent feature set: - Fully responsive tables - Desktop-centric tables

**Use the responsive table if:** - The table content should be flexible and visually appealing. The responsive table offers the most flexibility in regards to its content because multiple components can be used. In addition, different rows can be based on different item templates. - The focus lies on working on line items, not on individual cells. - A main use case involves selecting one or more items, for which details are needed in order to choose the correct item. - Line items are independent of each other and no operation across columns is needed. - You want to have only one implementation for all devices. **Use the grid table if:** - You need to display more than 1,000 rows at the same time. - The cell level and the spatial relationship between cells are more important than the line item, such as if users need to recognize patterns in the data, like in waterfall charts. - Comparing items is a major use case. The grid table layout remains stable irrespective of the screen width. In addition, a cell only ever contains one component. - You need an analytical table, but you cannot provide an analytical binding. **Do not use the table if:** - You want to display a simple hierarchical dataset. - You want to use a hierarchical master list for a master-detail scenario using the **Flexible Column Layout**. - Using a tree table would be too complex. - The main use case involves selecting one of several hierarchical items with only a few details per item. In these cases, use the **Tree** instead. **Use the responsive table if:** - The table content should be flexible and visually appealing. The responsive table offers the most flexibility in regards to its content because multiple components can be used. In addition, different rows can be based on different item templates. - The focus lies on working on line items, not on individual cells. - A main use case involves selecting one or more items, for which details are needed in order to choose the correct item. - Line items are independent of each other and no operation across columns is needed. - You want to have only one implementation for all devices. - You want to display a simple hierarchical dataset. - You want to use a hierarchical master list for a master-detail scenario using the **Flexible Column Layout**. - Using a tree table would be too complex. - The main use case involves selecting one of several hierarchical items with only a few details per item. In these cases, use the **Tree** instead.

Primary

The primary table contains columns with headers, and rows with links. In the first column, links are displayed. To display links within a table, add the \

Column Header Column Header Column Header Column Header Column Header
user.name@email.com
Very long Text Not Wrapped, limited by max-width Very long Text Not Wrapped, limited by max-width Very long Text Not Wrapped, limited by max-width Very long Text Not Wrapped, limited by max-width Very long Text Not Wrapped, limited by max-width Very long Text Not Wrapped, limited by max-width
Middle Name Last Name 01/26/17
user.name@email.com
Very long Text Wrapped, limited by max-width Very long Text Wrapped, limited by max-width Very long Text Wrapped, limited by max-width Very long Text Wrapped, limited by max-width
Middle Name Last Name 01/26/17
user.name@email.com First Name Middle Name Last Name 01/26/17

Individual non-interactive header cells

Non-interactive Column Header Column Header Column Header Column Header Non-interactive Column Header
user.name@email.com
Very long Text Not Wrapped, limited by max-width Very long Text Not Wrapped, limited by max-width Very long Text Not Wrapped, limited by max-width Very long Text Not Wrapped, limited by max-width Very long Text Not Wrapped, limited by max-width Very long Text Not Wrapped, limited by max-width
Middle Name Last Name 01/26/17
user.name@email.com
Very long Text Wrapped, limited by max-width Very long Text Wrapped, limited by max-width Very long Text Wrapped, limited by max-width Very long Text Wrapped, limited by max-width
Middle Name Last Name 01/26/17
user.name@email.com First Name Middle Name Last Name 01/26/17

Non-interactive header cells

Column Header Column Header Column Header Column Header Column Header
user.name@email.com
Very long Text Not Wrapped, limited by max-width Very long Text Not Wrapped, limited by max-width Very long Text Not Wrapped, limited by max-width Very long Text Not Wrapped, limited by max-width Very long Text Not Wrapped, limited by max-width Very long Text Not Wrapped, limited by max-width
Middle Name Last Name 01/26/17
user.name@email.com
Very long Text Wrapped, limited by max-width Very long Text Wrapped, limited by max-width Very long Text Wrapped, limited by max-width Very long Text Wrapped, limited by max-width
Middle Name Last Name 01/26/17
user.name@email.com First Name Middle Name Last Name 01/26/17

Borderless

Table can be displayed without borders that separate the columns, column headers, and rows. To display a borderless table, add the \

Table Without Borders

Column Header Column Header Column Header Column Header
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17

Borderless (body)

Table can be displayed without borders that separate the columns and rows only, leaving the column headers with borders. To display a borderless table body, add the \

Table Without Borders On Body

Column Header Column Header Column Header Column Header
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17

No outer Border

Table can be displayed without outer borders, might be needed when used inside some other element. To display a table without outer border, add the \

Table Without Outer Borders

Column Header Column Header Column Header Column Header
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17

Footer (condensed)

Table can be displayed with a footer. To display a table footer, add the \

Table With Footer Cozy Mode

Column Header Column Header Column Header Column Header
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17
First Name Last Name

Footer (condensed)

Similar to the previous example, table can be displayed with a footer in condensed mode (for desktop screens). To display a condensed table, add the \

Table With Footer Condensed Mode

Column Header Column Header Column Header Column Header
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17
First Name Last Name

Interactive

The table component can be interactive with hoverable and activable cells and rows. | Interaction | Modifier class | | :------------- | :------------------ | | Activate | \

Interactive Table With Hoverable and Activable Cells and Rows

Hovering And Clicking On Header's Cell Will Trigger Color Change
Clicking on any Cell

On This Row will cause

-2,000.00EUR Highlight of Whole Row 01/26/17
Clicking On Cell Will cause Highlight of cell Last Name 01/26/17
Hovering On Any Cell Will Change Background Of Certain Cell
Hovering On Any Cell And cells Will Change Background of Whole Row 01/26/17

Semantic

The table component can display highlight indicators to classify certain items with semantic states. To display status indicators in table, add the \

Table with Semantic Rows

Column Header Column Header Column Header Column Header
user.name@email.com

First Name

Last Name

01/26/17
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17

Focusable rows

Table can display focusable rows by adding the \

Table With Focusable Rows

Column Header Column Header Column Header Column Header Column Header
user.name@email.com First Name Middle Name Last Name 01/26/17
user.name@email.com First Name Middle Name Last Name 01/26/17

Focusable cells

Table can display focusable cells by adding the \

Table With Focusable Cells

Column Header Column Header Column Header Column Header Column Header
user.name@email.com First Name Middle Name Last Name 01/26/17
user.name@email.com First Name Middle Name Last Name 01/26/17

Checkbox (condensed)

Table can display checkboxes to allow the user to perform bulk actions. To display checkboxes in table, add the \

Table With Checkbox

Column Header Column Header Column Header Column Header
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17

Checkbox (condensed)

Table can be displayed with checkboxes in condensed mode. To display checkboxes in table, add the \

Table With Checkbox Condensed Mode

Column Header Column Header Column Header Column Header
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17

Pagination

Table can be displayed with bottom pagination by adding the \

Table With Pagination at The Bottom

Name Status Price Country
Banana Available 5 EUR India
Pineapple Out of stock 2 EUR Mexico
Orange Temporary unavailable 6 EUR Spain
30 Results

Advanced toolbar

The table component can be displayed with an advanced **Toolbar**, which allows users to customize their table. In this example, buttons trigger **Dialogs**. To display an advanced toolbar, pair \

Table With Advanced Shellbar

Name Status Price Country
Banana Available 5 EUR India
Pineapple Out of stock 2 EUR Mexico
Orange Temporary unavailable 6 EUR Spain

Contextual menu

Table can display a contextual menu containing actions if there is not enough space in a given row. It is recommended to use a contextual menu if there are more than three actions. To display table with a contextual menu, add the \

Table with Contextual Menu

Column Header Column Header Column Header Row Actions
user.name@email.com First Name 01/26/17
user.name@email.com First Name 01/26/17

Menu header

Table can display menu options from a popover within headers. The example below demonstrates headers containing customization actions such as _Ascending_ and _Descending_. To display a menu within a header, add the \

Table with Popover in Headers

Column Header
user.name@email.com First Name 01/26/17
user.name@email.com First Name 01/26/17
user.name@email.com First Name 01/26/17

Fixed header, footer and columns

Table can display fixed header, footer and columns (both, on the left and right). At first, wrap the table in a element with the \

Header Column Header Column Header Column Header Column Header Column Header Column Header Column Header Column
Row header Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum
Row header Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum
Row header Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum
Row header Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum
Row header Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum
Row header Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum
Row header Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum Lorem ipsum dolor sit amet ipsum
Lorem ipsum dolor Lorem ipsum dolor

Navigation from table rows

Responsive table allows navigation from a line item. For that purpose you need to add a column with the icon \

Responsive Table - row navigation

Name Status Price Country Row Actions
Banana Available 5 EUR India
Pineapple Out of stock 2 EUR Mexico
Orange Temporary unavailable 6 EUR Spain

Table - icon button for navigation

Name Status Price Country
Banana Available 5 EUR India
Pineapple Out of stock 2 EUR Mexico
Orange Temporary unavailable 6 EUR Spain

Navigation indicators

The table component can display navigation indicators. When multi-selection is used in a master-detail scenario, it is not clear which item was last opened, you can mark it as a “navigated” indicator, as indicated in the second row, to mark an item that is currently open. To display a navigated indicator, add the \

Table with Navigation Indication State

Column Header Column Header Column Header Column Header Row Actions
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17
user.name@email.com First Name Last Name 01/26/17

ResponsiveTable

The desktop responsive table should contain \

Responsive Table

Name Status Price Country Row Actions
Banana Available 5 EUR India
Pineapple Out of stock 2 EUR Mexico
Orange Temporary unavailable 6 EUR Spain

Responsive Table (pop-in mode)

The responsive table can be displayed in pop-in mode for mobile and tablet screens. To display responsive table in pop-in mode, add the \

Responsive Table - Pop-in mode

Name Price

Banana

India

5 EUR

Available

12.01.12

Very long name for orange, which no one expected, forces text wrapping into another line.

Spain

6 EUR

Out of stock

12.01.12

Responsive Table - Pop-in Mode with Checkboxes and Navigation Indicator

Name Price

Banana

India

5 EUR

Available

12.01.12

Very long name for orange, which no one expected, forces text wrapping into another line.

Spain

6 EUR

Out of stock

12.01.12

#Accessibility

Information about the table such as a title, summary, and/or keyboard navigation instructions should be provided in captions for screen readers. To caption table information, use the \

Inventory Status. Use arrow keys to navigate between cells.
Product Name Product ID Quantity Status Supplier Image Heavy Weight Categories Delivery Date
Notebook Basic 15 10 Available
Show image
Notebook Basic 17 0 Out of stock
Show image
Notebook Basic 18 13 Available
Show image

Table without data

Table can indicate that there is no data to display.

Header Column Header Column Header Column Header Column Header Column Header Column
No Items available.

Table with group rows

Table can have group rows, to get this do the following: - Add \

Type First Name Last Name Date
Group row (collapsed), level 1
Group row (expanded), level 1
Regular row, level 2 First Name Last Name 01/26/17
Group row (expanded), level 2
Regular row, level 3 First Name Last Name 01/26/17

Tree Table

Table can show tree-like rows, to get this do the following: - Add \

Type First Name Last Name Date
Regular row, level 1 First Name Last Name 01/26/17
Tree row, level 1, collapsed First Name Last Name 01/26/17
Tree row, level 1, expanded First Name Last Name 01/26/17
Regular row, level 2 First Name Last Name 01/26/17
Tree row, level 2, collapsed First Name Last Name 01/26/17
Tree row, level 2, expanded First Name Last Name 01/26/17
Regular row, level 3 First Name Last Name 01/26/17
Tree row, level 3, collapsed First Name Last Name 01/26/17
Regular row, level 4 First Name Last Name 01/26/17
Tree row, level 4, collapsed First Name Last Name 01/26/17
Regular row, level 5 First Name Last Name 01/26/17
Tree row, level 5, collapsed First Name Last Name 01/26/17
Regular row, level 6 First Name Last Name 01/26/17
Tree row, level 6, collapsed First Name Last Name 01/26/17