For the complete documentation index, see llms.txt. This page is also available as Markdown.

Creating a Component

When the system components don't cover a layout you need — a bespoke pricing block, a branded banner, a portal widget specific to your business — you create your own. User components become first-class blocks in the page editor, so a layout you build once can be reused across pages and portals. Create them in Content → Component Library.

The three-pane component editor: an Insert/Fields/Chat rail on the left, a live preview of a pricing-card component in the center, and the Props inspector for the selected field on the right
The component editor — fields on the left, a live preview in the center, and the selected field's properties on the right.

The fastest path: describe it to Mango

Describing a component to Mango now produces a native component — built from the same blocks the page editor uses (headings, text, containers, buttons, lists), not from generated code. That changes what you get in three ways that matter:

  • It's styled by your brand automatically. Native blocks inherit your tenant's look, so Mango's first draft already matches your pages.

  • Every element stays individually editable. Afterwards you can select any heading, button, or row and adjust it directly — in the component editor or right on a page — instead of treating the result as one opaque block.

  • It can't be stored broken. Native layouts are validated at save time; anything that cannot render is refused with the exact problem named, so a component never saves fine and then breaks on a customer's page.

Ask for something close, adjust it by hand, keep the result — that loop is the intended way to work. See Native components for the full picture: the block vocabulary, placeholders and formatters, dynamic lists, and promoting a layout you built on a page with Save as component.

The code path, when you need it

Code components remain for bespoke needs — visual designs the native blocks genuinely cannot express. You write (or have Mango draft) HTML and CSS in the editor's Code view, and the component renders exactly what you wrote.

Two ways to start

  • New Component — build a component from scratch in the component editor.

  • Create with Mango — describe what you want in plain language and have PeakCommerce generate a working native component for you, which you can then refine.

The component editor

The editor is a three-pane workspace:

  • Left rail — switch between Insert (drop in ready-made snippets), Fields (define the editable properties authors will see), and Chat (ask Mango to generate or change the component).

  • Center canvas — toggle between a live Preview (rendered at desktop, tablet, or mobile widths) and, for code components, the Code view for direct editing.

  • Right inspector — Props for the selected field or the whole component, and Data for binding the component to live commerce data.

When you ask Mango for a change, it proposes an edit you can accept, reject, or refine; accepting it updates the component — the native blocks or the code, whichever kind it is — together with its fields and the preview.

Settings to set

  • Category — how it's grouped in the library.

  • Contexts — which editors and page types it can be used in (Storefront, Checkout, Customer Portal, Partner Portal, CSR Portal, or Payment Pages). Choose every context where the component should be available.

  • Status — set it Active to make it available in the page editor.

Things to watch

  • Set the right contexts. A component only appears in editors whose context you selected — if it's missing from a page, its contexts are the first thing to check. The component editor's placement banner tells you outright when a component cannot appear anywhere, and why.

  • Active is what makes it usable. A saved-but-inactive component won't show up as a block until you activate it.

  • Define fields for anything authors should edit. Values you don't expose as fields are baked into the component and can only be changed back in the editor.

Once active, the component appears in the Component Library and can be placed on any page whose context matches.

Last updated

Was this helpful?