Dynamic table

A dynamic table displays rows of data with built-in pagination, sorting, and re-ordering functionality.

Neutral selected states

When the platform-dst-tokens-finesse feature flag is enabled, this component uses the new neutral treatment for selected states.

Installation

Package installation information
Installyarn add @atlaskit/dynamic-table
SourceBitbucket.org, (opens new window)
npm@atlaskit/dynamic-table, (opens new window)
Bundleunpkg.com, (opens new window)

Props

caption

Description

Caption for the table styled as a heading. This appears before the table header, and is announced when people who use assistive technology land on the table. If you don’t want the caption to appear on the page but do want it to be available for assistive technology, surround the caption with <VisuallyHidden>.

Typestring | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal

createAnalyticsEvent

Description

You should not be accessing this prop under any circumstances. It is provided by @atlaskit/analytics-next and integrated in the component

Type(payload: AnalyticsEventPayload) => UIAnalyticsEvent

defaultPage

Description

When the table is initially rendered, use this to set which page number is shown by default. In most circumstances, people will expect this to be page 1.

Typenumber

defaultSortKey

Description

Sets which column the rows should be sorted by when the table is initially rendered. Corresponds to the key's defined in the head prop.

Typestring

defaultSortOrder

Description

Default column sort order used when initially rendering. Defaults to "ASC".

Type"ASC" | "DESC"

emptyView

Description

Shown when the table has no content.

TypeReactElement<any, string | JSXElementConstructor<any>>

highlightedRowIndex

Description

Use this to set if the row will be highlighted. Never use highlighted rows to indicate that a person has selected or focused on the row.

Typenumber | number[]

isFixedSize

Description

Use this to force columns to use their initial width regardless of the size of the content that loads in.

Typeboolean

isLoading

Description

Displays a loading spinner overlaid on top of the current page.

Typeboolean

isRankable

Description

Use this to enable drag and drop sorting of table rows.

Typeboolean

isRankingDisabled

Description

Disables being able to drop rows on the table. We recommend using isRankable instead of this prop, and it will be deprecated in a future release.

Typeboolean

label

Description

If you don’t use a caption, then you’ll need to use label to describe the table for assistive technologies. Avoid using both at the same time as they may conflict. Rather than a screen reader speaking "Entering table", passing in an label allows a custom message like "Entering Jira work items table".

Typestring

loadingLabel

Description

Use this to set a label for assistive technology that describes the loading state. The default label is "Loading table". You can customize this to be more specific to your table, for example “Loading work items table”.

Typestring

loadingSpinnerSize

Description

Configuration of the loading spinner shown when isLoading is true. Defaults to "large" when a page has more than two rows, else "small".

Type"small" | "large"

onPageRowsUpdate

Description

A callback that happens when the rows displayed on a page have changed.

Type(pageRows: RowType[]) => void

onRankEnd

Description

A callback that happens when a drop of a row has completed.

Type(rankEnd: RankEnd) => void

onRankStart

Description

A callback that happens when a drag of a row has started.

Type(rankStart: RankStart) => void

onSetPage

Description

A callback that happens when the table page has changed.

Type(page: number, UIAnalyticsEvent?: UIAnalyticsEvent) => void

onSort

Description

A callback that happens when a column heading has been sorted. Use this to provide custom sorting.

Type(data: any, UIAnalyticsEvent?: UIAnalyticsEvent) => void

page

Description

Page the table should show.

Typenumber

paginationi18n

Description

Labels for the previous and next buttons used in pagination. Defaults to "Previous" and "Next".

TypeI18nShape

ref

Description
No description.
Type((instance: any) => void) | RefObject<any>

rows

Description

Rows to be placed in the table. Each row contains cells which should map to the ones defined in the head. Rows accept standard HTML <tr> props in addition to those listed below. Ensure each cell has a unique key per column - this is used for both React's reconciliation of lists and column sorting.

TypeRowType[]

rowsPerPage

Description

Use this to control how many rows should be displayed per page. If the number of rows exceed one page, this will enable pagination.

Typenumber

sortKey

Description

Column key that the rows should be sorted by. Corresponds to the key's defined in the head prop.

Typestring

sortOrder

Description

Column sort order.

Type"ASC" | "DESC"

testId

Description

A testId prop is provided for specified elements, which is a unique string that appears as a data attribute data-testid in the rendered code, serving as a hook for automated tests. The value of testId is used to prefix testId props in given elements.

  • {testId}--table - Table.
  • {testId}--head - Table header.
  • {testId}--head--{content of the cell} - Table header cell can be identified by their content.
  • {testId}--row--{index - content of the first cell} - Table row.
  • {testId}--body - Table body.
  • {testId}--body--{content of the cell} - Table body cell can be identified by their content.
  • {testId}--loadingSpinner - The spinner overlaid when loading.
  • {testId}--pagination - The table pagination.
Typestring
Was this page helpful?
We use this feedback to improve our documentation.
© 2026 AtlassianTrademark, (opens new window)Privacy, (opens new window)License