theme and messages fields in TrustwareConfigOptions, and a handful of props directly on <TrustwareWidget>.
theme field
Thetheme field sets the widget’s color scheme.
"light" | "dark" | "system"
default:"\"system\""
The color scheme applied to the widget.
"system" follows the user’s OS
preference.Example
Color and border radius customization, the
primaryColor, backgroundColor,
radius, and related fields of the former TrustwareWidgetTheme object, was
available through @trustware/sdk 1.1.7 and was replaced by this light, dark,
and system setting in 1.1.8. If your project is pinned below 1.1.8, refer to
the type definitions shipped with your installed version.Widget-level theme prop
<TrustwareWidget> accepts a theme prop that takes the same three values.
"light" | "dark" | "system"
Sets the color scheme for this widget instance. In swap mode the prop takes
precedence over the
theme config field, falling back to "system".showThemeToggle
boolean
default:"true"
When
true, a light/dark mode toggle is rendered inside the widget, letting
the user switch modes themselves. Defaults to true. Set to false when
your application owns the color scheme and you do not want users to override
it from the widget surface.showThemeToggle applies to deposit mode. The swap mode surface does not
render a theme toggle, so the prop has no effect when the widget runs in swap
mode.messages field
Themessages field overrides the title and description text rendered at the top of the widget. Both properties are optional.
Default messages
Message properties
string
default:"\"Trustware SDK\""
The heading shown at the top of the widget.
string
The subheading or descriptor shown beneath the title.
