Skip to content
Agentic Experience Design Language Help Go to the portal

Start from a template

Take a whole screen from the templates as a prompt, as code, or as a new product with pfdl create.

For developers2 min read

Templates are whole product screens built with the design language: dashboards, lists, forms, settings and more. Start from the closest one when its layout and flow fit what you're building. When none fits, compose the screen from patterns instead.

Find a template

  1. Open Templates in the portal's top bar (/templates).
  2. Open a template to see its preview. Use States, where it has them, to try its variations, Theme for light or dark, and Viewport for desktop, tablet or phone. Full screen opens it in a tab of its own.

Signed in, you also see your organisation's templates. The preview shows the design system chosen in the portal's top bar.

Use this template

Under the preview, Use this template offers three ways to take it:

  • Copy prompt: a prompt for your AI tool that starts from this screen in the states you chose. Paste it into Claude Code, Codex or another tool that has the design language (Use AI tools).
  • Copy code: every file the screen needs, with the steps to bring it into a product, on your clipboard.
  • Download: the same files as a zip.

Start a new product with pfdl create

pfdl create writes a product repository that runs: Vite, React and TypeScript with @purple-fabric/ui, pfdl.config.json, the agent instruction files, the checks as scripts and a CI workflow. It installs, pushes and publishes nothing.

The template's id is the last part of its address: for /templates/<id>, use <id>.

node pfdl.mjs create acme-console --template <id>
cd acme-console
npm install
npm run dev
  • Without --template, you get an empty first screen.
  • --brand <id> starts in a design system. Signed in, and without --brand, the product starts in your organisation's default.
  • Your organisation's templates and design systems need your sign-in: pfdl connect sign-in, or PFDL_TOKEN.
  • --force writes into a folder that isn't empty.

When it's done, the command lists anything left to do, such as replacing placeholder logos or sample data. npm run check runs the type check, pfdl lint and the render test.

To get the command line, see The pfdl command line.

When no template fits

Open Patterns (/patterns, also linked from Templates). Patterns are page layouts, flows and states between a component and a template, each with when to use it and a working example. Compose your screen from them rather than bending a template to fit.

If something goes wrong

If something goes wrong
What you seeWhat to do
No template "<id>" hereCheck the id in the template's address. For your organisation's, sign in first.
<folder> exists and isn't emptyChoose another folder, or add --force.
The code isn't available right nowTry Copy code again in a moment, or use Download.