一键导入
launchpad-ux-custom-components
Introduces Custom UX in Pega Launchpad / Constellation, when to build custom components, and what design information is needed.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Introduces Custom UX in Pega Launchpad / Constellation, when to build custom components, and what design information is needed.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | launchpad-ux-custom-components |
| description | Introduces Custom UX in Pega Launchpad / Constellation, when to build custom components, and what design information is needed. |
| tags | ["launchpad","constellation","custom-ux","components","dxcb"] |
This skill introduces Custom UX for Pega Launchpad built on the Constellation design system. It explains:
Custom components extend the standard Constellation UX by adding specialized visualizations, interactions, or integrations while still respecting Launchpad's design language and runtime model.
IMPORTANT: When a user requests a custom component, the agent MUST follow the step-by-step conversation flow defined in references/conversation-flow.md.
Do NOT generate any code until all steps are completed and the user confirms.
The flow ensures:
See references/conversation-flow.md for the complete conversation script and examples.
Before building a custom DX component for Launchpad, ensure you have:
Development environment
Launchpad Provider access
OAuth client credentials for DXCB
clientId and clientSecret for tasks.config.jsonProvider details
https://your-provider.launchpad.io)Prefer out-of-the-box Constellation components and templates whenever they meet the business and UX requirements. Before deciding to build a new custom component, Astro should explicitly warn and remind the user to:
Check the UX Boosters catalog first
Confirm Constellation / Launchpad does not already support it out of the box
Consider Custom UX only when, after these checks:
Before deciding on Custom UX, validate that:
To successfully design and implement a Custom UX component, gather the following information first:
User and use case definition
Data and APIs
Interaction and behavior
Visual and layout design
Technical constraints and libraries
Documenting these inputs up front helps ensure the Custom UX component is:
Custom UX components should integrate cleanly with Launchpad's DX approach:
DXCB (Digital Experience Component Builder) is the framework and tooling used to build Constellation-compatible custom components. It provides a standard way to:
Using DXCB ensures that custom components:
At a high level, building a Launchpad custom component with DXCB involves:
Initialize a DXCB project
From a terminal, in the folder where you want your DXCB project:
npx @pega/custom-dx-components@~25.1 init
Important: Always check the official Pega documentation for the current recommended version (see Official Pega documentation section at the end of this skill).
Configure tasks.config.json
After initialization, DXCB creates a tasks.config.json file. Configure the server-config section with your Launchpad Provider details (see Prerequisites):
server – Provider frontend URLclientId and clientSecret – OAuth credentialsisolationID – Provider isolation IDTreat credentials as sensitive and follow your internal security practices.
Create a component folder
Inside the components directory (for example, src/components):
range-slider-template).config.json that defines the component type, subtype, and configuration.index.tsx) that uses getPConnect() and, where needed, global PCore.DXCB supports three main kinds of Constellation components:
When in doubt, think in terms of Constellation UX patterns:
Case details bands and summary cards
subtype: "DETAILS".examples/dxcb-examples/range-slider-template/ writes min/max values back to case fields via getPConnect().getActionsApi().updateFieldValue(...).Dashboards and landing page tiles
subtype: "PAGE" (or ["PAGE", "CASE"] if reused in Utilities).examples/dxcb-examples/calendar-widget/ shows upcoming work items from a Constellation data page and uses PCore + getPConnect() for navigation and previews.Utilities pane helpers in case view
subtype: "CASE".Custom field controls
"Integer", "Text", "Decimal").examples/dxcb-examples/star-rating-input/ writes an integer score and respects Constellation field behaviors.Choosing the correct type and subtype ensures:
Once you have implemented your component in the DXCB project:
Build the component
Run the DXCB build script from the root of the DXCB project, for example:
npm run buildComponent
Authenticate against the target Provider
Use the DXCB authentication script (for example, npm run Authenticate) so DXCB can publish to your Launchpad Provider using the server-config values in tasks.config.json.
Publish the component
Run the publish script (for example, npm run publish) to register the component in the Provider.
After a successful publish, your component will appear in Launchpad Studio as:
type and subtype).When a developer asks Astro to build a new custom component, the agent should:
Identify the closest matching example
https://github.com/pegasystems/constellation-ui-gallery/tree/next/src/componentsconfig.json type and subtype (Field / Widget / Template) and overall behavior best match the request.Use config.json.properties as the question checklist
properties array in the chosen example’s config.json as view metadata that must be filled in.inputProperty, minValueProperty, maxValueProperty):
label, helperText):
format, maxRating):
source.)”dataPage):
contextProperty, setCaseID):
groups, groupProperty):
A regions):
min, max, step):
Confirm and summarize before generating code
config.json with those values wired in, andindex.tsx implementation that:
getPConnect().getRawMetadata().config to read them, andreferences/PCore-PConnect-APIs.md.For deeper code-level guidance when building DXCB components, use the consolidated reference in this skill folder:
references/PCore-PConnect-APIs.md – how to use per-component PConnect APIs (getPConnect()) and global PCore APIs (data pages, events, pub/sub, semantic URLs) in Launchpad custom components.This SKILL.md stays focused on when and how to design custom components and how DXCB fits into Launchpad. The references/ document is for detailed implementation patterns.
Important: For Launchpad, use the
nextbranch of the Constellation UI Gallery repository as the reference for component patterns and examples:https://github.com/pegasystems/constellation-ui-gallery/tree/next/src/components
Do NOT use the
masterbranch or Infinity-specific repositories, as they may contain patterns not applicable to Launchpad.
When generating new custom components, the agent should:
https://github.com/pegasystems/constellation-ui-gallery/tree/next/src/components to find similar patterns.Examples of component patterns available in the repository:
Pega_Extensions_BarCode – barcode display/input component.Pega_Extensions_Calendar – calendar/scheduling widget.Pega_Extensions_IframeWrapper – wrapper for embedding external content in an iframe.Pega_Extensions_KanbanBoard – Kanban-style board for work items.Pega_Extensions_Meter – meter/gauge visualization.Pega_Extensions_QRCode – QR code display/input component.Pega_Extensions_RangeSlider – range slider template for numeric ranges.Pega_Extensions_RatingLayout – rating layout template for case summaries.Pega_Extensions_SignatureCapture – signature capture field component.Pega_Extensions_StarRatingInput – star rating input field.Pega_Extensions_UtilityList – utility list widget for case/portal context.When generating a new Field component (such as a password input, text input, or similar single-value control), Astro should:
Pega_Extensions_StarRatingInput) instead of inventing a new structure.
PegaExtensionsPasswordInput.export default withConfiguration(PegaExtensionsPasswordInput); using withConfiguration from @pega/cosmos-react-core.Input component from @pega/cosmos-react-core rather than <input>/<label> HTML elements.Text component with a masked value (for example, '***********' for passwords) instead of an editable field.getPConnect, label, value, helperText, validatemessage, hideLabel, displayMode, hasSuggestions, fieldMetadata, additionalProps, testId, disabled, readOnly, required.true and 'true' as true).fieldMetadata (for example, fieldMetadata.maxLength) to set constraints such as maxLength on the Input.getPConnect() and derive:
const actions = pConn.getActionsApi();const propName = pConn.getStateProps().value; (the case field name backing the field).actions.updateFieldValue(propName, newValue) only when the value actually changes.actions.triggerFieldChange(propName, newValue) and, when applicable, pConn.ignoreSuggestion().displayMode === 'DISPLAY_ONLY', do not render an editable input; return a non-editable representation (for passwords, a masked Text value).validatemessage, hasSuggestions, and similar props to drive the field status ('error', 'pending', etc.) on the Cosmos Input, following patterns from existing Pega_Extensions_* field components.When generating or adapting React components for Launchpad Custom UX, the agent should follow this priority order:
First, check @pega/cosmos-react-core (https://www.npmjs.com/package/@pega/cosmos-react-core) for existing components that match the requirement. Common components include: Input, Button, Text, Flex, Grid, Card, Badge, Icon, FormField, Select, Checkbox, DatePicker, Modal, Table, Tabs, and many more. Use these directly instead of creating custom implementations.
Second, compose using multiple Cosmos components if no single component matches. Combine layout, form, and display components from @pega/cosmos-react-core.
Third, only create a custom component when no existing Cosmos component or composition meets the requirement.
import statements in existing components from the reference repository and reuse those packages and components in new code.package.json dependencies.For a detailed list of preferred packages and the full priority guidelines, see references/frontend-packages.md.
When creating DXCB components, follow these naming and structure conventions to ensure consistency and discoverability:
Pega_Extensions_<Name> format (e.g., Pega_Extensions_StarRatingInput, Pega_Extensions_Calendar).name and componentKey values in config.json.| File | Purpose | Required |
|---|---|---|
index.tsx | Main React component implementation | ✅ Yes |
config.json | DX component metadata (type, subtype, properties) | ✅ Yes |
Docs.mdx | Documentation for Storybook/gallery | ✅ Yes |
demo.stories.tsx | Storybook stories for previewing the component | ✅ Yes |
demo.test.tsx | Jest unit tests | ✅ Yes |
styles.ts | Styled-components / CSS-in-JS | Optional |
localizations.json | i18n strings | Optional |
React imports: Always include the React default import at the top of the file. This ensures JSX works correctly with the DXCB TypeScript configuration:
import React, { useState, useEffect, useCallback } from 'react';
Important: Never use
import { useState } from 'react'without the default React import. The DXCB project's tsconfig uses"jsx": "react"which requires React to be in scope for JSX transformation.
Export with withConfiguration: Always wrap the component using withConfiguration from @pega/cosmos-react-core:
import React from 'react';
import { withConfiguration } from '@pega/cosmos-react-core';
const PegaExtensionsMyComponent = (props) => { /* ... */ };
export default withConfiguration(PegaExtensionsMyComponent);
TypeScript React patterns: Use functional components with TypeScript.
getPConnect typing: Use getPConnect?: any for component props unless a shared stronger type already exists in the repo. Avoid creating duplicate one-off PegaConnect, PegaActionsApi, or PegaStateProps interfaces.
Field-style components:
hideLabel as the public prop name.labelHidden={hideLabel} only to Cosmos controls internally.disabled, readOnly, and required as booleans, but coerce runtime string 'true' values using the shared pattern:
const [readOnlyBool, requiredBool, disabledBool] = [readOnly, required, disabled].map(
(v) => v === true || v === 'true'
);
Ensure your config.json follows this structure:
{
"name": "Pega_Extensions_MyComponent",
"componentKey": "Pega_Extensions_MyComponent",
"label": "My Custom Component",
"description": "A custom component for...",
"type": "Field",
"subtype": "Text",
"properties": [
{
"name": "label",
"label": "Label",
"format": "TEXT"
},
{
"name": "value",
"label": "Value",
"format": "PROPERTY"
}
]
}
When creating demo.stories.tsx for your component:
select controls for props with constrained values instead of free-text inputs.testId, hideLabel, disabled, readOnly, required.Docs.mdx if needed.Before considering a component complete, run these validation steps to ensure quality:
Run the linter to catch code style issues and potential errors:
npm run lint
To auto-fix issues:
npm run fix
Before publishing, verify the component builds correctly:
npm run buildComponent
Use this checklist before concluding a component implementation:
Pega_Extensions_<Name> conventionconfig.json name and componentKey match the folder nameindex.tsx exports a typed component wrapped with withConfigurationhideLabel (not labelHidden) as the public propdisabled, readOnly, required) handle string 'true' valuesgetPConnect follows repo conventions (getPConnect?: any)Docs.mdx explains the component and matches live propsdemo.stories.tsx renders with appropriate mocksselect for constrained propsDocs.mdx under ## Examplesdemo.test.tsx covers key rendering, behavior, and edge casesstyles.ts and localizations.json exist only when justifiednpm run lint passes (or issues explicitly reported)npm run testWhen building custom components, follow these rules to avoid common pitfalls:
package.json first.npm run lint and relevant tests, or explicitly report why validation was skipped.For the most up-to-date guidance, refer to these official Pega resources:
| Topic | Documentation Link |
|---|---|
| Extending Launchpad with DX components | https://docs.pega.com/bundle/launchpad/page/platform/launchpad/extend-applications-constellation-dx-components.html |
| Working with DX components in Launchpad | https://docs.pega.com/bundle/launchpad/page/platform/launchpad/working-constellation-dx-component-launchpad.html |
| Initialize a DXCB project | https://docs.pega.com/bundle/constellation-dx-components/page/constellation-dx-components/custom-components/initialize-project.html |
| Constellation DX components overview | https://docs.pega.com/bundle/constellation-dx-components/page/constellation-dx-components/custom-components/custom-components.html |
| Launchpad vs Infinity differences | https://docs.pega.com/bundle/launchpad/page/platform/launchpad/differences-constellation-dx-components-launchpad-infinity.html |
Custom Functions are a type of Function that extends LaunchPad with code written in Java 11, Python 3.12, or Node.js 20 via AWS Lambda. Use this skill whenever the user asks what is a custom function, what types of functions exist, how to create or extend Launchpad with custom logic, or when troubleshooting handler naming conventions (Java package.Class::method, Python file.function), signature mismatches, AWS Lambda execution limits, or timezone/null handling in date or list functions. Use when the user needs to parse Excel files, perform advanced date manipulations, integrate external libraries, or handle specialized data transformations. Use when user asks for Callable rules.
Guide for building custom React front-ends on Pega Launchpad using the Pega React SDK (@pega/react-sdk-components). Use this skill whenever users ask about building complete custom front-ends over a Launchpad application. Do not use this skill for questions about DX API methods unless they specifically relate to building a custom front-end. Do not use this skill for questions about custom UX components or the pega-embed web component.
Explains how to use the Create Case DX API, including scalar content payloads, reference fields, allowed fields, and when to use this pattern.
Explains how to embed Launchpad applications into external websites and custom front-end apps using the pega-embed web component. Covers CORS policy setup, OAuth authentication (Client Credentials and PKCE), embed attributes, theming, events, and complete code examples for React/Next.js integration.