Data table
Data table
Component demo
Interactive example
Data table details
Props
All components also accept native properties supported by the DOM, such asclassName
and
style
.
|
|
|
---|---|---|
|
The title for the table only visible to screen readers. |
|
|
The column headers for the table. |
|
|
Determines whether the column header should be truncated and display a tooltip. Default is |
|
|
The row content for the table. |
|
|
Set the density of the table including font and padding. |
|
|
If |
|
|
Applies a border to the table container. |
|
|
Sets the row height on all rows in the table that aren't set using the |
|
|
Sets the table height. Can be set to |
|
|
If |
|
|
If |
|
|
When set to |
|
|
Sets the props for the circular loading indicator used in the loading state. |
|
|
Sets the maximum width of the data table. Can be set in |
|
|
Sets the minimum width of the data table. Can be set in |
|
|
The minimum amount of time the |
|
|
Sets the props for the built-in pagination bar. If the |
|
|
If |
|
|
Sets the order columns will be sorted in and allows for 'default' sorts to be added. |
|
|
If |
|
|
If |
|
|
If |
|
|
Sets the layout of the table |
|
|
Sets the theme color to the dark or light theme color. "inherit" will set the color based on the system settings or ic-theme component. |
|
|
Sets the method used to truncate long text in cells where textWrap is |
|
|
If |
|
|
Sets the props for the linear loading indicator used in the updating state. |
|
|
Allows for custom setting of row heights on individual rows based on an individual value from the |
|
|
Sets the table width. Can be set to |
|
The title for the table only visible to screen readers. |
The column headers for the table. |
Determines whether the column header should be truncated and display a tooltip. Default is |
The row content for the table. |
Set the density of the table including font and padding. |
If |
Applies a border to the table container. |
Sets the row height on all rows in the table that aren't set using the |
Sets the table height. Can be set to |
If |
If |
When set to |
Sets the props for the circular loading indicator used in the loading state. |
Sets the maximum width of the data table. Can be set in |
Sets the minimum width of the data table. Can be set in |
The minimum amount of time the |
Sets the props for the built-in pagination bar. If the |
If |
Sets the order columns will be sorted in and allows for 'default' sorts to be added. |
If |
If |
If |
Sets the layout of the table |
Sets the theme color to the dark or light theme color. "inherit" will set the color based on the system settings or ic-theme component. |
Sets the method used to truncate long text in cells where textWrap is |
If |
Sets the props for the linear loading indicator used in the updating state. |
Allows for custom setting of row heights on individual rows based on an individual value from the |
Sets the table width. Can be set to |
Slots
A slot allows for any type of element or markup to be passed into and rendered within a web component. This creates more flexibility than using a prop which must take a specific type of data.
Content can be slotted into a component by adding it as a top-level child of the component.
Slots can have a name to identify them. These specify which slot the content will be inserted into, and therefore where it will be rendered and how it will be used within the component. The name of the slot to be used can be specified by passing it via a
slot
attribute on the slotted content.
|
|
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Events
All components also accept native events supported by the DOM, such as
onClick
and
onKeyDown
.
|
|
|
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Methods
|
|
|
---|---|---|
|
|
|
|
Variants
Embedded
Interactive example
Dense
Interactive example
Spacious
Interactive example
Sticky column headers
Interactive example
Row headers
Interactive example
Sortable
Interactive example
Sort options
Interactive example
Pagination
Interactive example
Column overrides
Interactive example
Row overrides
Interactive example
Cell overrides
Interactive example
Default Empty State
Interactive example
Slotted Empty State
Interactive example
Loading state
Interactive example
Updating state
Interactive example
Links and Elements in data
Interactive example
Custom icons
Interactive example
Custom row heights
Interactive example
Custom title bar
Interactive example
This is some text and