Skip to content

Your components

Pieces with your look, generated into your repository, and yours to keep and change.

Applies to EngineCloud
View as Markdown
On this page
  1. What gets generated
  2. Yours to change
  3. When the guide changes
  4. Frameworks

Your pieces live in your repository, as ordinary React and CSS. Design generates them from your guide; after that, they are yours.

What gets generated

Text
src/design/
├─ index.ts                 every piece, exported
├─ tokens.css → ../../design/tokens.css
└─ components/
   ├─ Button/
   │  ├─ Button.tsx         your look over @sypnia/base's Button
   │  ├─ Button.module.css  only tokens, no raw values
   │  └─ README.md          what it is for, from the gallery
   ├─ TextField/ …
   ├─ ProductCard/          a piece of your own, made of base pieces
   └─ PickupCode/

There are two kinds of pieces:

KindExamplesMade from
Base pieces with your lookButton, TextField, Select, Dialog, Sheet, Menu, Tabs, Toastone @sypnia/base piece each
Pieces of your ownProductCard, PickupCode, Stepper («Choose → Confirm → Pick up»)several base pieces, composed

The generator writes the structure and the accessibility wiring. The look comes from your guide: its tokens and its shape language (corners, fills or outlines, shadows or borders). The agent, with the Design skills, tailors each piece to your brand, so two bakeries with the same pieces still look like two bakeries.

Yours to change

The files are plain source code. Change them as you like: a different hover, an extra variant, a piece rewritten by hand. Design keeps track of what it generated:

Terminal
npx @sypnia/design components status
Text
Button        up to date (guide 3)
ProductCard   edited by you
Stepper       out of date: guide 4 changed radius.card

When the guide changes

A change to the guide regenerates the affected pieces in a pull request. For a piece you edited, Design merges its new version with your changes, keeps yours where they touch the same lines, and shows the conflicts for you or your agent to resolve. Your edits are never overwritten silently.

Frameworks

Generated pieces are React (Next.js, Vite, or Astro with React; static pages render them on the server). design/tokens.css works in any framework, so a page outside React can still use your colours, fonts and spacing.

  1. What gets generated
  2. Yours to change
  3. When the guide changes
  4. Frameworks

    Search pages, sections and terms