Style Config Shape
ElementStyle object where the keys are camelCase CSS properties.
Passing Styles
Per-element — passstyle in the options when creating an element:
appearance when calling OzVault.create(). It accepts an Appearance object with an optional theme preset and/or variables overrides. All elements inherit this; per-element style merges on top.
Themes
Thetheme preset provides a complete set of defaults. Available themes:
You can combine
theme + variables — the theme applies first, then variables override on top.
Omitting
theme is not the same as no theme. Passing appearance: {} or appearance: { variables: { ... } } without a theme key applies the 'default' preset as a base. To render elements with no preset styling at all, omit the appearance prop entirely and use per-element style overrides.AppearanceVariables
Supported Style Properties
Typography
Spacing & Box
Background & Border
Sizing
Caret
Transitions & Cursors
Properties like
position, display, and width that could affect iframe layout are not supported. Use height / minHeight to control the field’s vertical size.Custom Fonts
To use a custom web font inside the iframes, pass afonts array to OzVault.create(). You can reference a Google Fonts URL:
Complete Example
Reflecting State with CSS Classes
Combine thechange event with CSS classes on your wrapper element to style the border and background based on field state:
Updating Styles at Runtime
Callelement.update({ style: { ... } }) to restyle a field without re-mounting it:
- Properties you include are merged into the current style — they replace their previous values.
- Properties previously set but absent from the new
styleobject retain their current values (no keys are cleared by omission). - To reset a specific property, pass it explicitly with an empty string:
{ base: { color: '' } }. - To fully reset all styles, destroy and recreate the element.
- Global vault appearance theme styles are always preserved underneath.
style prop on individual field components — it is applied on every render.
React
In React, passappearance to <OzElements> and style to individual field components:
Next Steps
Card Elements
All card field options and events.
Bank Elements
All bank field options and events.