@osforms/react exposes the full FormTheme type for TypeScript consumers. The theme prop is layered over the schema theme and the default dark theme.
FormTheme
fontSize and borderRadius mostly affect classic mode. Conversational mode uses its own fixed sizes.
Selected rating stars are always amber (#fbbf24), regardless of the theme.
Priority
Theme values are resolved in this order (highest to lowest):OSFormthemepropFormSchema.theme- Default dark theme
colors, fontFamily, borderRadius, …) replaces the schema’s value for that key. So colors replaces the schema’s entire colors object, and colors you leave out fall back to the SDK defaults, not to the schema. Pass every color you care about.
Passing themes
Light theme example
Custom fonts
SetfontFamily to any CSS font-family string. The SDK does not load fonts — ensure the font is loaded in your app (e.g., via Google Fonts or next/font):
ConversationalRenderer and ClassicRenderer
The low-level renderers don’t apply defaults, so theirtheme prop takes a fully resolved theme, not a FormTheme. Pass an object with all 7 colors, fontFamily, fontSize and borderRadius as CSS values ('16px', '8px', not 'md'), and buttonVariant, as in the example below. That resolved theme type isn’t exported, so write the object inline. Most apps should use OSForm instead.