RuntimeConfig UI runtime block

Purpose

RuntimeConfig is an event/resource/effect runtime block. Safe public runtime config. Use to pass non-secret browser configuration.

Inputs

Field Required Type Behavior
config yes object Public runtime keys. moduleBase is the same-origin module route prefix such as /modules/notes/; apiBase is the same-origin API prefix such as /modules/notes/api; assetBase is a same-origin or host-resolved asset prefix; locale is a BCP 47 language tag such as en, fi, or fi-FI, defaulting to the host locale when omitted. Unknown keys are allowed only when their names do not look sensitive.
featureFlags no object Public booleans or strings. Missing flags default to false/disabled in consumers. Flag values must not carry secrets or user-private data.

Boundary

Validation rejects sensitive-looking keys such as token, secret, password, credential, apiKey, privateKey, and authorization, including case variations and common separators. Rejected keys fail validation instead of being silently omitted.

Example

package notesui

var runtimeConfig = (
  <RuntimeConfig
    config={map[string]any{
      "moduleBase": "/modules/notes/",
      "apiBase": "/modules/notes/api",
    }}
    featureFlags={map[string]bool{"reviewMode": true}}>
  </RuntimeConfig>
)

Sources