# DetailPageModule component for Stripe Apps Use DetailPageModule 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/detailpagemodule?app-sdk-version=8. The `DetailPageModule` 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/detailpagemodule?app-sdk-version=9. To add the `DetailPageModule` component to your app: ```js import {DetailPageModule} from '@stripe/ui-extension-sdk/ui'; ``` The `DetailPageModule` 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. You can use this component in two forms: - `table`: 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. - `propertyList`: Displays structured key-value data pairs in either a horizontal or vertical orientation. You can use this format for showing object details, configurations, or any information that naturally fits into label-value relationships, maintaining Stripe’s design consistency. It can display up to eight items. #### Table For more examples, see the [`DetailPageTable` reference](https://docs.stripe.com/stripe-apps/components/detailpagetable.md). ### DetailPageModuleTable props | Property | Type | | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `columns` | (Required) `DetailPageModuleTableColumn[]` The columns to display in the table. Related types: [DetailPageModuleTableColumn](https://docs.stripe.com/stripe-apps/components/detailpagemodule.md#detailpagemoduletablecolumn). | | `pending` | (Required) `boolean` Sets the visual style to pending. | | `type` | (Required) `"table"` The type of the module. | | `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/detailpagemodule.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/detailpagemodule.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/detailpagemodule.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/detailpagemodule.md#detailpagemoduletablerowactiongroup), [DetailPageModuleTableRowAction](https://docs.stripe.com/stripe-apps/components/detailpagemodule.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/detailpagemodule.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/detailpagemodule.md#texttablecell), [LinkTableCell](https://docs.stripe.com/stripe-apps/components/detailpagemodule.md#linktablecell), [DateTableCell](https://docs.stripe.com/stripe-apps/components/detailpagemodule.md#datetablecell), [IdTableCell](https://docs.stripe.com/stripe-apps/components/detailpagemodule.md#idtablecell), [StatusTableCell](https://docs.stripe.com/stripe-apps/components/detailpagemodule.md#statustablecell), [CurrencyTableCell](https://docs.stripe.com/stripe-apps/components/detailpagemodule.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/detailpagemodule.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/detailpagemodule.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/detailpagemodule.md#detailpagemoduletablerowaction). | | `id` | (Required) `string` The unique identifier for the action group. | | `label` | (Required) `string` The label of the action group. | #### PropertyList For more examples, see the [`DetailPagePropertyList` reference](https://docs.stripe.com/stripe-apps/components/detailpagepropertylist.md). ### DetailPageModulePropertyList props | Property | Type | | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `pending` | (Required) `boolean` Sets the visual style to pending. | | `type` | (Required) `"propertyList"` The type of the module. | | `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/detailpagemodule.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/detailpagemodule.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/detailpagemodule.md#detailpagemoduleaction). | | `items` | (Optional) `DetailPagePropertyListItem[] | undefined` The items to display in the property list. Each item defines a label-values pair. Related types: [DetailPagePropertyListItem](https://docs.stripe.com/stripe-apps/components/detailpagemodule.md#detailpagepropertylistitem). | | `orientation` | (Optional) `("vertical" | "horizontal") | undefined` The orientation of the list. | ### DetailPageModuleEmptyActionMessage | Property | Type | | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `action` | (Required) `Action` An call to action displayed below the message. Related types: [Action](https://docs.stripe.com/stripe-apps/components/detailpagemodule.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/detailpagemodule.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. | ### DetailPagePropertyListItem | Property | Type | | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `label` | (Required) `string` The label of the property. | | `values` | (Required) `Array` The values of the property. Related types: [Values](https://docs.stripe.com/stripe-apps/components/detailpagemodule.md#detailpagepropertylistitem-values). Related types: [DetailPageModulePropertyListItemValue](https://docs.stripe.com/stripe-apps/components/detailpagemodule.md#detailpagemodulepropertylistitemvalue). | | `description` | (Optional) `string | undefined` The description of the property. | ### DetailPagePropertyListItem Values | Property | Type | | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `label` | (Optional) `DetailPageModulePropertyListItemValue | undefined` The label of the value. Related types: [DetailPageModulePropertyListItemValue](https://docs.stripe.com/stripe-apps/components/detailpagemodule.md#detailpagemodulepropertylistitemvalue). | | `value` | (Optional) `DetailPageModulePropertyListItemValue | undefined` The sub-value of the value. Related types: [DetailPageModulePropertyListItemValue](https://docs.stripe.com/stripe-apps/components/detailpagemodule.md#detailpagemodulepropertylistitemvalue). | ### DetailPageModulePropertyListItemValue | Property | Type | | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `action` | (Optional) `Action | undefined` An action to display in the value. Related types: [Action](https://docs.stripe.com/stripe-apps/components/detailpagemodule.md#detailpagemodulepropertylistitemvalue-action). | | `text` | (Optional) `string | undefined` The label of the value. | ### DetailPageModulePropertyListItemValue Action | Property | Type | | --------- | ---------------------------------------------------------------------------------- | | `onPress` | (Required) `() => void` An event handler for when the user clicks the action. | | `title` | (Required) `string` The title of the action. | ## 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)