# DetailPageTable component for Stripe Apps Use DetailPageTable to render your app in Stripe dashboard pages. # v8 > This is a v8 for when app-sdk-version is 8. View the full page at https://docs.stripe.com/stripe-apps/components/detailpagetable?app-sdk-version=8. The `DetailPageTable` component isn’t available in the selected SDK version. # v9 > This is a v9 for when app-sdk-version is 9. View the full page at https://docs.stripe.com/stripe-apps/components/detailpagetable?app-sdk-version=9. To add the `DetailPageTable` component to your app: ```js import {DetailPageTable} from '@stripe/ui-extension-sdk/ui'; ``` The `DetailPageTable` component provides a standardized way to display and organize content within the Stripe Dashboard. It creates a consistent UI section that seamlessly integrates with Stripe’s design system. It’s specifically designed for displaying tabular data in a format that matches the surrounding Dashboard experience. It provides a consistent way to show data within the Stripe Dashboard that aligns with Stripe’s design system. ### DetailPageTable props | Property | Type | | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `columns` | (Required) `DetailPageModuleTableColumn[]` The columns to display in the table. Related types: [DetailPageModuleTableColumn](https://docs.stripe.com/stripe-apps/components/detailpagetable.md#detailpagemoduletablecolumn). | | `pending` | (Required) `boolean` Sets the visual style to pending. | | `createAction` | (Optional) `(() => void) | undefined` An event handler to create a new item. | | `emptyMessage` | (Optional) `(string | DetailPageModuleEmptyActionMessage) | undefined` The message to display when the table is empty. Related types: [DetailPageModuleEmptyActionMessage](https://docs.stripe.com/stripe-apps/components/detailpagetable.md#detailpagemoduleemptyactionmessage). | | `error` | (Optional) `DetailPageModuleDisplayError | undefined` Sets the visual style to `error`, displaying an error message. Related types: [DetailPageModuleDisplayError](https://docs.stripe.com/stripe-apps/components/detailpagetable.md#detailpagemoduledisplayerror). | | `extraActions` | (Optional) `DetailPageModuleAction[] | undefined` An array of extra actions to display in the module. Related types: [DetailPageModuleAction](https://docs.stripe.com/stripe-apps/components/detailpagetable.md#detailpagemoduleaction). | | `items` | (Optional) `DetailPageModuleTableItem[] | undefined` The items to display in the table. | | `onItemPress` | (Optional) `((item: DetailPageModuleTableItem) => void) | undefined` An event handler for when the user clicks an item. | | `rowActions` | (Optional) `(DetailPageModuleTableRowAction | DetailPageModuleTableRowActionGroup)[] | undefined` Actions to display in the row. Related types: [DetailPageModuleTableRowActionGroup](https://docs.stripe.com/stripe-apps/components/detailpagetable.md#detailpagemoduletablerowactiongroup), [DetailPageModuleTableRowAction](https://docs.stripe.com/stripe-apps/components/detailpagetable.md#detailpagemoduletablerowaction). | ### DetailPageModuleTableColumn | Property | Type | | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `key` | (Required) `string` The unique identifier for the column. | | `label` | (Required) `string` The label to display for the column. | | `cell` | (Optional) `DetailPageModuleTableCellFormat | undefined` Cell format options. Related types: [DetailPageModuleTableCellFormat](https://docs.stripe.com/stripe-apps/components/detailpagetable.md#detailpagemoduletablecellformat). | | `hideHeaderLabel` | (Optional) `boolean | undefined` Sets the column label to be hidden. | | `pinned` | (Optional) `boolean | undefined` Whether the column is pinned. | ### DetailPageModuleTableCellFormat This is a union type. It can be one of: [TextTableCell](https://docs.stripe.com/stripe-apps/components/detailpagetable.md#texttablecell), [LinkTableCell](https://docs.stripe.com/stripe-apps/components/detailpagetable.md#linktablecell), [DateTableCell](https://docs.stripe.com/stripe-apps/components/detailpagetable.md#datetablecell), [IdTableCell](https://docs.stripe.com/stripe-apps/components/detailpagetable.md#idtablecell), [StatusTableCell](https://docs.stripe.com/stripe-apps/components/detailpagetable.md#statustablecell), [CurrencyTableCell](https://docs.stripe.com/stripe-apps/components/detailpagetable.md#currencytablecell). ### TextTableCell | Property | Type | | -------- | ---------------------------------------------- | | `type` | (Required) `"text"` The type of the cell. | ### LinkTableCell | Property | Type | | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | (Required) `"link"` The type of the cell. | | `linkMap` | (Optional) `{ [x: string]: string; } | undefined` A map of URLs to link text. If no mapping is found for a URL, the URL itself is used as the link text. | ### DateTableCell | Property | Type | | -------- | ---------------------------------------------- | | `type` | (Required) `"date"` The type of the cell. | ### IdTableCell | Property | Type | | -------- | -------------------------------------------- | | `type` | (Required) `"id"` The type of the cell. | ### StatusTableCell | Property | Type | | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `statusMap` | (Required) `{ [x: string]: "neutral" | "urgent" | "warning" | "negative" | "positive" | "info"; }` A map of cell values to status types. | | `type` | (Required) `"status"` The type of the cell. | ### CurrencyTableCell | Property | Type | | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `currency` | (Required) `string` Three-letter ISO-4217 currency code or a non-ISO currency code like `USDC` for USD Coin or `BTC` for Bitcoin. | | `type` | (Required) `"currency"` The type of the cell. | | `currencyMap` | (Optional) `{ [x: string]: CurrencyCode; } | undefined` Specifies a per-item currency code override, keyed by table item id. If an item id is not present in the map, the value of currency is used. This allows a single column to display multiple currencies. | ### DetailPageModuleEmptyActionMessage | Property | Type | | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `action` | (Required) `Action` An call to action displayed below the message. Related types: [Action](https://docs.stripe.com/stripe-apps/components/detailpagetable.md#detailpagemoduleemptyactionmessage-action). | | `message` | (Required) `string` A custom message to display when the table is empty. | ### DetailPageModuleEmptyActionMessage Action | Property | Type | | -------- | ------------------------------------------------- | | `href` | (Required) `string` The link of the action. | | `label` | (Required) `string` The label of the action. | ### DetailPageModuleDisplayError | Property | Type | | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `message` | (Required) `string` The error message to display. | | `errorAction` | (Optional) `ErrorAction | undefined` An action to handle the error. Related types: [ErrorAction](https://docs.stripe.com/stripe-apps/components/detailpagetable.md#detailpagemoduledisplayerror-erroraction). | ### DetailPageModuleDisplayError ErrorAction | Property | Type | | -------- | ------------------------------------------------------- | | `href` | (Required) `string` Native `href` attribute. | | `title` | (Required) `string` The title of the error action. | ### DetailPageModuleAction | Property | Type | | --------- | ------------------------------------------------------------- | | `label` | (Required) `string` The label of the action. | | `onPress` | (Required) `() => void` An event handler for the action. | ### DetailPageModuleTableRowAction | Property | Type | | --------- | -------------------------------------------------------------------------------------------- | | `id` | (Required) `string` The unique identifier for the action. | | `label` | (Required) `string` The label of the action. | | `onPress` | (Required) `(item: DetailPageModuleTableItem) => void` An event handler for the action. | | `type` | (Optional) `("default" | "destructive") | undefined` The type of the action. | ### DetailPageModuleTableRowActionGroup | Property | Type | | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `actions` | (Required) `DetailPageModuleTableRowAction[]` The actions to display in the action group. Related types: [DetailPageModuleTableRowAction](https://docs.stripe.com/stripe-apps/components/detailpagetable.md#detailpagemoduletablerowaction). | | `id` | (Required) `string` The unique identifier for the action group. | | `label` | (Required) `string` The label of the action group. | ## Row item press Add interactivity to your Detail Page table by defining an `onItemPress` handler. This allows you to respond when users click individual rows. ## Row actions Add actions to individual rows by using the `rowActions` prop. This displays an overflow menu at the end of the row with the specified actions. ## Pending Display a loading state while your content is being fetched or processed by using the `pending` prop. This is useful for async operations where the UI needs to indicate that data is loading. ## Error state Display an error state when your app fails to load content by using the `error` prop as shown below. ## Extra actions You can add extra actions to to your Detail Page Module by providing the `extraActions` prop. ## See also - [Design patterns to follow](https://docs.stripe.com/stripe-apps/patterns.md) - [Style your app](https://docs.stripe.com/stripe-apps/style.md) - [UI testing](https://docs.stripe.com/stripe-apps/ui-testing.md)