Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Theming

Set the color mode, accent, and dialog backdrop when creating your client:

import { OneAuthClient } from '@rhinestone/1auth'
 
const client = new OneAuthClient({
  providerUrl: 'https://passkey.1auth.app',
  clientId: 'my-app',
  theme: {
    mode: 'dark',
    accent: '#4F41EF',
    backdrop: {
      color: '#52525c',
      opacity: 0.5,
      blur: 12,
    },
  },
})

Theme options

PropertyTypeDescription
mode'light' | 'dark' | 'system'Color mode. system follows the user's OS preference
accentstringHex color for buttons and interactive elements
backdrop.colorstringSix-digit hex tint. Default: #000000
backdrop.opacitynumberOpacity from 0 to 1. Default: 0.4
backdrop.blurnumberBlur radius from 0 to 40 pixels. Default: 8

On dark pages, use a lighter backdrop tint to distinguish the dialog from the background. Each backdrop field defaults independently; the same settings apply while the dialog loads.

Update theme at runtime

client.setTheme({ mode: 'dark', accent: '#ec4899' })

Per-method theming

Individual methods such as signMessage() also accept a theme option for request-specific overrides.