TIMESDevelopers
v1.0.0

UI and tokens

Match the merchant theme with tokens.css and the SDK primitives.

import '@times/aip-sdk/tokens.css';
import { Button, EmptyState, Page } from '@times/aip-sdk';

tokens.css defines OKLCH CSS variables (--background, --foreground, --primary, --border, --radius and more). The host sends the active theme in the init payload and the SDK writes those variables, so your UI follows light, dark and every merchant palette.

Primitives

<Page title={t('home.title')}>
  {invoices.length === 0 ? (
    <EmptyState title={t('home.empty')} />
  ) : (
    <InvoiceTable rows={invoices} />
  )}
  <Button onClick={sendReminders}>{t('home.send')}</Button>
</Page>

React is an optional peer dependency. Vanilla bundles can use the tokens without the primitives.

Design rules

  • Use the token variables. Do not hard code colors.
  • Keep layouts usable at 360px wide.
  • Show loading states for every network call.