Skip to main content
TapRailsThemeProvider is the root context provider for all TapRails UI components. It serves two purposes:
  1. Theme context — makes your color overrides available to all TapRails components via useTheme
  2. Session key management — automatically detects when a session key is missing and shows the SessionKeySetupFlow

Import

Usage

Props

Partial<TapRailsColors>
Optional color overrides to apply to the TapRails theme. Any keys not provided fall back to TapRails defaults.

TapRailsColors


useTheme

Access the merged theme (your overrides + TapRails defaults) inside any child component:
useTheme must be called within a component that is a descendant of TapRailsThemeProvider. Calling it outside will throw an error.

TapRailsTheme Type