Themes and styling
React
Import the package stylesheet once in the application entry point:
Code
Built-in themes
theme accepts standard, modal, simplified, or spotlight. colorMode accepts light,
dark, or system.
Code
The theme name and color mode select the corresponding built-in Vanilla Extract class. Placement
does not automatically change the theme property, so an application can choose its own pairing.
Custom themes
The form0-react/theme.css.js export exposes the vars theme contract:
Code
Pass the generated class to theme:
Code
Use className for form-level styling and ordinary wrapper elements for surrounding application
layout. Custom field markup belongs in a custom renderer.
Last modified on