Components and the allowlist
There are three kinds of component in the template:
- Editorial (
@csdr/editorial) — carry reports and analyses. Figure, Table, StatTile, Callout, Ref, KeyMessages, Abstract, DataDownload, Authors, Definition, Icon. - Charts (
@csdr/charts) — Chart, LineChart, BarChart (build-time SVG), ChartIsland (interactive). - PatternFly React (
@patternfly/react-core,@patternfly/react-table) — rendered server-side by Astro; used on landing, tools and docs. Only components indesign/allowlist.jsonmay be imported inapps/site.
Extending the list
Section titled “Extending the list”- Add the component name to
reactCore(orreactTable) indesign/allowlist.json, then runpnpm pf:barrel(regenerates the entry map the build uses to resolve@patternfly/react-coreimports — a name that is not in the map fails the build). - Add a page under
apps/site/src/pages/design/with a live example and its code, and an entry inapps/site/src/components/design/catalogue.ts. - Note it in
design/COMPONENTS.md.
Never import patternfly.css, patternfly-base.css or @patternfly/react-core/dist/styles/base.css — the theme package supplies tokens and the base; components bring their own CSS.
PatternFly documentation, locally
Section titled “PatternFly documentation, locally”The full PatternFly React docs and examples are in node_modules:
node_modules/@patternfly/react-core/src/components/<Name>/examples/<Name>.mdand*.tsx—pnpm pf:example Button "Variations"prints a sectionnode_modules/@patternfly/react-icons/dist/esm/icons/*.js—pnpm icons find <term>- The PatternFly MCP server adds design guidelines and JSON prop schemas:
claude mcp add patternfly-mcp -- npx -y @patternfly/patternfly-mcp@latest