Customer Theme Kit
What is sent to a customer to collect their theme, what comes back, and how it is checked and applied.
This page is for the people who onboard a customer. It describes the files a customer receives, what they fill in and how their answer becomes the theme of their account.
What the Customer Receives
Section titled “What the Customer Receives”| Item | Where it is | Purpose |
|---|---|---|
| Theme template | themes/template.json in the package |
The one file to fill in and send back; it becomes theme.json |
| Example themes | themes/examples/neutral.json, fashion.json, electronics.json, grocery.json |
Show what the tokens can do |
| Design reference | The “Recommendation widgets” design canvas and the “Segmentify Widgets” design system | Show every widget in each example theme |
| Token guide | The section “What to Fill In” below | Explains each value in plain words |
The customer sends back one file: the template with their values.
What to Fill In
Section titled “What to Fill In”The template asks for eleven values and the font. Each can be left as it is.
| Value | Question to answer | Example |
|---|---|---|
foreground |
What colour are your headings? | #111111 |
primary |
What colour is your main button? | #1d4ed8 |
primaryForeground |
What colour is the text on that button? | #ffffff |
secondary |
What colour should the slider arrows be? | #ffffff |
secondaryForeground |
What colour is the arrow icon on it? | #111111 |
muted |
What colour are quiet, inactive elements? | #c4c4c4 |
mutedForeground |
What colour is secondary text, such as a crossed-out price? | #6b6b6b |
card |
What is the background of a product card? | #ffffff |
cardForeground |
What colour is the text on a product card? | #111111 |
sale |
What colour do you use for discounts? | #d62028 |
radius |
How round are your corners? | 8px (0 for square) |
fontFamily |
Which font does your site use? | "Inter", sans-serif, or inherit to follow the page |
A filled-in file:
{ "$schema": "https://segmentify.com/schemas/widgets/widget-theme.v1.json", "schemaVersion": 1, "name": "Acme Store", "theme": { "foreground": "#0f172a", "primary": "#1d4ed8", "primaryForeground": "#ffffff", "secondary": "#0f172a", "secondaryForeground": "#ffffff", "muted": "#cbd5e1", "mutedForeground": "#5b6779", "card": "#ffffff", "cardForeground": "#0f172a", "sale": "#c2410c", "radius": "16px", "fontFamily": "inherit" }}Rules for the values
Section titled “Rules for the values”- Colours: hex (
#1d4ed8) orrgb(29, 78, 216). Hex is preferred, because contrast can only be checked for hex andrgb(). - Sizes: a number with
pxorrem, or0. - Font: the family name as it is used in the site’s CSS. The widget does not load font files; the font must already be on the site.
- No CSS, no images, no links. A file with anything else is refused.
- Text on a background should reach a contrast of 4.5 to 1 (
primaryForegroundonprimary,cardForegroundandmutedForegroundoncard).
Finer control
Section titled “Finer control”A customer who wants one part to differ adds a component token to the same file, for example "buttonRadius": "999px" or "priceColor": "#1d4ed8". The full list is on the Theming page. The examples use a few of them.
When the File Comes Back
Section titled “When the File Comes Back”- Import it on the theme form of the account in the panel. Until the form exists (SFY-27911), put the file in the root of the account’s integration repository as
theme.json. - Read the validation answer. The schema and
reviewThemerun on it: refused tokens come back with the reason, low-contrast pairs with their ratio. A file with a refused token is not saved. - Send refusals and warnings back to the customer in their own words: which value, what is wrong, what would be accepted.
- Save. The file is committed to the account’s repository as
theme.jsonand the account’s files are built for QA. - Approve. After a look at QA the change is approved in the panel and built for production. Every widget of the customer uses the theme from then on.
To change the design later, change the values on the same form; each change goes through QA and approval again. A single campaign can still differ: its own theme overrides the account’s theme token by token.
Where the Theme Applies
Section titled “Where the Theme Applies”| Level | Where it is set | Scope |
|---|---|---|
| Account theme | The theme form of the account in the panel; kept as theme.json in the account’s repository |
Every widget of the customer |
| Site CSS | The customer’s own stylesheet, optionally | Every widget on a page or in a section of it |
| Campaign theme | The campaign’s config | One campaign |
Details and the order between them are on the Theming page.
Status of the Pieces
Section titled “Status of the Pieces”| Piece | Status |
|---|---|
Token system, theme file format and schema, template, examples, setWidgetTheme, reviewTheme |
In the library |
| Validating a saved theme and starting the flow | sauron, SFY-27910 |
| The theme form with a live preview, QA result and approval | dashboard, SFY-27911 |
Committing theme.json to the account’s repository and building, QA first, production on approval |
cdn-manager, SFY-27912 |
theme.json, check-theme in the build and the setWidgetTheme call in the template |
integration-template, SFY-27753 |
| A closed grammar for token values, proven with hostile values | widget-library, SFY-27908 |