theme object per call, or set
a default on the constructor or provider; per-call values override the default field by
field.
The tokens
Every field is optional. Setting just
accent and background gets you most of the way
— the app derives the surface and text ramps from them.
Bad values fail safe
Each field validates independently, server-side, inside the invest app. Anything invalid silently falls back to the Cesto default, so a bad value can never render an unreadable dialog — you get a Cesto-themed dialog rather than a broken one. This also means the SDK does not validate what you pass: values are serialized onto the invest URL as query params and judged at the other end. If a token seems to be ignored, check the format before checking the wiring.Data attributes
Every field has adata-cesto-* equivalent on the [data-cesto-invest] element, which
overrides the theme passed to bindInvestButtons field by field:
Because the theme travels on the URL, it applies in popup mode too — it
is the same page.
The bundled button
<CestoInvestButton> reads the same resolved theme, so the CTA and the dialog it opens
can’t disagree. Three tokens reach it:
accent— the fill, border, and focus ring.- Its paired text ink, computed from the accent’s luminance so the label stays readable on any fill you choose.
radius— the button’s corners.
font-family — the button adopts
your typography rather than shipping Cesto’s.
unstyled or asChild — see
React.
Matching your design tokens
If your site already has CSS custom properties, read them off the page and pass them straight in:#rrggbb — a token defined as oklch() or rgb() will
be dropped in favour of the Cesto default.
Related
Widgets theming
The widget iframes take a larger token set, including fonts and spacing.
React button
Variants, sizes,
unstyled, and asChild.