Theming & Customization
Theme configuration
<TrustConnectProvider
config={{ namespaces: [...], services: [...] }}
theme="dark"
>
{children}
</TrustConnectProvider>Value
Description
Programmatic theme control
import { useTheme } from '@trustwallet/connect-react'
function ThemeToggle() {
const { theme, resolvedTheme, setTheme, toggleTheme } = useTheme()
return (
<div>
<p>Current: {resolvedTheme}</p>
<button onClick={toggleTheme}>Toggle</button>
<button onClick={() => setTheme('dark')}>Dark</button>
<button onClick={() => setTheme('light')}>Light</button>
<button onClick={() => setTheme('auto')}>Auto</button>
</div>
)
}Property
Type
Description
Full UI customization
Last updated
Was this helpful?