Skip to content

Your gallery

Which piece to use for what, how to combine them, and every piece shown live.

Applies to EngineCloud
View as Markdown
On this page
  1. The file: design/gallery.yaml
  2. The page

The gallery is the guide to your pieces: what each one is for, what it is not for, how pieces go together, and which screen pattern fits each kind of use case. It is a file your agent reads and a page people look at.

The file: design/gallery.yaml

design/gallery.yaml (part)
pieces:
  - id: button
    component: components/Button
    for: The one action that moves the person forward on a screen.
    not_for: Navigation to another place (use link). More than one per screen (use button-quiet for the rest).
    variants: [primary, quiet, danger]
    states: [rest, hover, pressed, focus, disabled, busy]
  - id: product-card
    component: components/ProductCard
    for: One product the customer can add, with its photo, name, price and what is left today.
    combines_with: [stepper, quantity]
  - id: pickup-code
    component: components/PickupCode
    for: The code the customer shows at the counter. Only on the outcome of place-order.
combinations:
  - id: choose-and-confirm
    pieces: [product-card, quantity, button]
    for: Choosing several things and confirming once.
    rule: One primary button, at the bottom on a phone, at the side on a desktop.
patterns: [ … ]   # see Patterns
FieldWhat it says
idthe piece’s name, used by screen files
componentwhere it lives in src/design/
forwhen to use it, in one sentence
not_forwhen not to, and what to use instead
variants, stateswhat the gallery shows
combines_withpieces that are often next to it
combinationsgroups of pieces with a rule for how they sit together

A piece that is not in gallery.yaml cannot be used on a screen: the agent proposes it first.

The page

WhereWho sees it
Enginenpx @sypnia/design gallery at http://localhost:4520you
Clouddesign.app.sypnia.com/<organization>/<project>/gallery, and in App’s side panelyour organization’s members; share links for others expire after 7 days

For every piece it shows each variant and state, live, in light and dark, at phone and desktop width, next to its «for» and «not for», and the list of screens that use it.

  1. The file: design/gallery.yaml
  2. The page

    Search pages, sections and terms