Skip to main content
Version: Next

Token Reference

Branding tokens are organized into five groups: colors, borders, typography, widget, and background. All groups are optional. When a token is absent or invalid, Shyntr falls back to the tenant's inherited value, then to the system default.

Tokens are set via the dashboard branding editor or directly through the Admin API. Both paths produce the same stored token set and the same rendered output.


colors

Controls the color palette used across all surfaces.

{
"colors": {
"primary": "#5B4CF5",
"background": "#FFFFFF",
"text": "#1A1A2E",
"border": "#E2E8F0"
}
}
TokenApplied toFallback
primaryButtons, links, focus rings#5B4CF5
backgroundPage or card background#FFFFFF
textPrimary text#1A1A2E
borderBorders when borders.width > 0#E2E8F0

All color values must be valid CSS hex strings (#RRGGBB or #RGB). RGB, HSL, and named color strings are rejected with a validation error.


borders

Controls the visual boundary style applied to cards, inputs, and containers.

{
"borders": {
"width": 1,
"radius": 8
}
}

borders.width

PropertyTypeRangeDefault
widthinteger0101
  • 0 removes all borders. No border element is rendered.
  • The value maps directly to pixels — no scaling applied.
  • Values outside 010 are rejected with a validation error.

borders.radius

PropertyTypeRangeDefault
radiusinteger0324
  • 0 produces sharp rectangular corners.
  • 32 produces heavily rounded corners.
  • Values outside 032 are clamped to the nearest bound (not rejected).

typography

Controls the font family and semantic weight levels used in all UI text.

{
"typography": {
"fontFamily": "Inter, sans-serif",
"fontWeightNormal": 500,
"fontWeightBold": 600
}
}

typography.fontFamily

A CSS font-family string. The font must be available in the runtime environment — either a system font or loaded via a CSP-approved CDN. If the specified font cannot be resolved, the browser falls back to the next family in the stack.

typography.fontWeightNormal and typography.fontWeightBold

Semantic weights only

Shyntr accepts exactly 500 for normal weight and 600 for bold weight. No other values are valid. This constraint is enforced at write time to eliminate weight-mapping ambiguity between the dashboard preview and the auth portal runtime.

FieldAccepted valueApplied to
fontWeightNormal500Body text, labels
fontWeightBold600Headings, emphasized text

Any other integer is rejected with a validation error. Values are never silently rounded or remapped.


widget

Controls the tenant-specific copy and logo rendered inside the login card.

{
"widget": {
"loginTitle": "Sign in to Acme",
"loginSubtitle": "Use your Acme credentials to continue.",
"logoUrl": "https://cdn.acme.com/logo.svg"
}
}
TokenDescriptionMax lengthFallback
loginTitleHeading at the top of the login card80 charactersTenant display name
loginSubtitleSupporting text below the title160 charactersEmpty (not rendered)
logoUrlAbsolute URL to the tenant logo2048 charactersShyntr mascot

Logo fallback: If logoUrl is not set or fails to load, the Shyntr mascot is displayed in its place. This ensures the login card always has a visible identity mark — set logoUrl to override it with your own.

Normalization rules:

  • loginTitle and loginSubtitle are HTML-escaped. Markdown and HTML tags are rendered as plain text.
  • logoUrl must use the https:// scheme. http://, data:, and relative URLs are rejected.
  • Logo dimensions are constrained to 200px × 80px maximum; the image is scaled proportionally within that box.

background

Controls the surface behind the login and consent cards.

{
"background": {
"color": "#F8F9FF",
"image": "https://cdn.acme.com/auth-bg.jpg"
}
}
TokenDescriptionFallback
colorSolid background color (CSS hex)#FFFFFF
imageAbsolute https:// URL to a background imageNo background image

Fallback logic:

  1. If image is set and resolves, it renders as a cover-sized layer over color.
  2. If image is set but fails to load, color is shown instead.
  3. If neither is set, the system default background color applies.

Setting both color and image is valid and recommended — color acts as the safe fallback when the image is unavailable.


Full example

{
"colors": {
"primary": "#5B4CF5",
"background": "#FFFFFF",
"text": "#1A1A2E",
"border": "#E2E8F0"
},
"typography": {
"fontFamily": "Inter, sans-serif",
"fontWeightNormal": 500,
"fontWeightBold": 600
},
"borders": {
"width": 1,
"radius": 8
},
"widget": {
"loginTitle": "Sign in to Acme",
"loginSubtitle": "Use your Acme credentials to continue.",
"logoUrl": "https://cdn.acme.com/logo.svg"
},
"background": {
"color": "#F8F9FF",
"image": "https://cdn.acme.com/auth-bg.jpg"
}
}

Validation summary

TokenBehavior on invalid input
borders.width outside 010Rejected — validation error
borders.radius outside 032Clamped to nearest bound
colors.* not a CSS hex stringRejected — validation error
typography.fontWeightNormal500Rejected — validation error
typography.fontWeightBold600Rejected — validation error
widget.logoUrl not https://Rejected — validation error
background.image not https://Rejected — validation error