Main accent color used for highlights, buttons, and active states
backgroundColor
string
Colors used for backgrounds, text and other secondary elements (ignored when using the bold style preset)
successColor
string
The color used for any success messages
warningColor
string
The color used for any warning messages
errorColor
string
The color used for any error messages
stylePreset
'clean' | 'bold'
Defines the way in which the colours are used to theme the widget
borderRadius
'none' | 'sm' | 'md' | 'lg'
The size of the border radii used throughout the widget
showContainer
true | false
Swap a container around the widget
Use our theme outside of widget
If you use Tailwind and want to apply the package styles for your custom app's elements you will need to add the sw class to some wrapping element within your app, for example:
You also need to import non-bundled theme files as not all the CSS classes are prebuilt.
By default all theme variables are set to body element. You can change it by using themeParentElementSelector configuration option.
CSS Variable Overrides (Advanced)
If you want to get even more granular, you can override the widget’s CSS variables directly. This method gives you complete control over colors, typography, spacing, borders, and fonts.
Our package uses Tailwind, but your app doesn't have to. The package exposes CSS variables to control styling, with each variable and its corresponding Tailwind token using the sw- prefix to avoid conflicts with your app's theme and variables.