Match your brand
Documents @snap4id-sdk/app-embed 1.0.0 · @snap4id-sdk/embed-protocol 1.0.0 · protocol 1.0
The page starts from the theme in your partner configuration (set by Snap4ID at onboarding). Your app can adjust it
per session; the values travel in the host hello (theme) and are cosmetic: a wrong value is dropped, never a
broken session.
// React Native: per app (client config) and per flow (prop); the flow wins per key.createSnap4IdClient({ // … theme: { 'color.accent.primary': '#a855f7', 'color.cta.primary': '#a855f7' },});
<Snap4IdFlow client={snap4id} theme={{ 'radius.scale': '0.5' }} … />;Native host: put the same object in your hello payload as theme. Precedence per key: flow prop → client config →
partner configuration → Snap4ID default. The theme is read when the flow opens.
Tokens
Section titled “Tokens”| Token | Default | Format |
|---|---|---|
base |
dark |
only dark (the page is dark-themed) |
color.accent.primary |
#3b82f6 |
#rrggbb (also drives the pressed and soft accent unless set) |
color.accent.soft |
#60a5fa |
#rrggbb |
color.text.onAccent |
#ffffff |
#rrggbb |
color.cta.primary |
#ffffff |
#rrggbb (main buttons) |
color.cta.onPrimary |
#0f172a |
#rrggbb |
color.bg.primary |
#020617 |
#rrggbb (page background) |
color.bg.secondary |
#1e293b |
#rrggbb |
color.bg.surface |
#1e293b |
#rrggbb (also drives controls unless set) |
color.bg.card |
#0f172a |
#rrggbb |
color.text.primary |
#f8fafc |
#rrggbb |
color.text.secondary |
#e2e8f0 |
#rrggbb |
color.text.muted |
#94a3b8 |
#rrggbb |
color.border.primary |
#334155 |
#rrggbb |
font.sans |
google-sans |
google-sans or system |
radius.scale |
1 |
0 to 2, up to two decimals |
Validation
Section titled “Validation”At most 32 keys; backgrounds must stay dark and text light; text pairs need a contrast of at least 4.5:1, accents and controls 3:1. Unknown keys are dropped; an invalid theme is ignored as a whole (the configuration theme stays). If your app’s keys pass on their own but break a contrast pair together with the configuration theme, the page keeps the configuration theme.
