These styling options apply to the pre-built widget rendered by the
ThunderPhoneWidget React component and the ThunderPhone.mount() CDN method. If you need a completely custom UI, use the headless hook instead.Themes
Thetheme prop controls the widget’s color scheme. It applies a tp--light or tp--dark class to the widget root:
Both themes use the glassmorphic bar design with backdrop blur and subtle transparency.
CSS Custom Properties
The widget exposes CSS custom properties (variables) that you can override to change colors without touching individual classes. They are defined by the theme class (.tp--light or .tp--dark) applied to the .tp-widget root:
Overriding Custom Properties
Set the accent color via theprimaryColor prop:
.tp-widget.tp--light / .tp-widget.tp--dark) so your rule outweighs the theme class that defines the defaults, regardless of stylesheet order:
CSS Classes
All widget classes are prefixed withtp- to avoid conflicts with your existing styles.
Examples
Custom Accent via Props
The simplest way to brand the widget:Custom Colors via CSS
Override the custom properties for full color control. Remember that the accent comes from theprimaryColor prop, not CSS:
Custom Size
Make the widget larger or smaller by adjusting the bar, button, and text dimensions:Hide the Text Labels
All of the widget’s text lives in.tp-meta. Hide it entirely to keep just the waveform and buttons:
The idle label lives in
.tp-name/.tp-sub, not .tp-status — hiding .tp-status alone still shows the title when the widget is idle.Theme-Specific Overrides
Target a specific theme with the theme class:Scoping with className
When using the React component, pass aclassName prop to scope your overrides to a specific widget instance:
primaryColor prop (CSS cannot override --tp-accent — it is set inline).
Fully Custom UI
If CSS overrides are not enough, the headless hook gives you full control. You provide all the HTML and styling whileuseThunderPhone handles the voice session. The hook also provides audioLevelRef for building audio-reactive visualizations like waveforms.