Common UI kit components
Confluence UI kit components
Jira UI kit components
Jira Service Management UI kit components

Rate this page:

SpaceCustomContentListView

Renders a list of custom content created within a space.

Example of a SpaceCustomContentListView component

Usage notes

SpaceCustomContentListView component is available for confluence:spacePage and confluence:spaceSettings modules.

Import statement

1
2
import ForgeUI, { SpaceCustomContentListView } from '@forge/ui';

Props

NameTypeRequiredDescription
spaceKeystingYesThe key for the space for which the list is displayed.
typestringYesThe custom content type for which the list is displayed.

Use the following format for the type: forge:[APP_ID]:[ENVIRONMENT_ID]:[MODULE_KEY].

Where:
  • forge: The prefix for content type created with Forge.
  • APP_ID: The identifier for your Forge app.
  • ENVIRONMENT_ID: The environment ID where the app was deployed. For more details, see Environments and versions.
  • MODULE_KEY: `confluence:customContent` module key.

Example

1
2
import ForgeUI, {render, Text, SpacePage, useProductContext, SpaceCustomContentListView} from '@forge/ui';

const App = () => {
    const {spaceKey, localId, environmentType} = useProductContext();
    
    // extractAppId implementation omitted
    const type = `forge:${extractAppId(localId)}:${environmentType}:customer`;
    return (
        <SpaceCustomContentListView type={customContentType} spaceKey={spaceKey} />
    );
};

export const run = render(
    <SpacePage>
        <App/>
    </SpacePage>
);

Rate this page: