Skip to main content

Theme Variables

The UI Kit SDK lets you customize its look by overriding CSS variables (aka theme tokens). You can apply global overrides (affecting both light & dark) or theme-specific overrides via light and dark sub-objects.

Usage

  • Pass the themeOverrides prop to the PushUniversalWalletProvider component to override app wide theme variables.
  • You can further extend this by passing the themeOverrides prop to the PushUniversalAccountButton for supported variables. These always begins with --pwauth-.
REACT PLAYGROUND
import {
  PushUniversalWalletProvider,
  PushUniversalAccountButton,
  PushUI,
} from '@pushchain/ui-kit';

function App() {
  return (
    <PushUniversalWalletProvider
      config={{
        uid: 'applevel',
        network: PushUI.CONSTANTS.PUSH_NETWORK.TESTNET
      }}
      themeOverrides={{
        '--pw-core-bg-primary-color': '#FAF3E0', // global override
        '--pw-core-bg-secondary-color': '#FFFDF9',
      }}
    >
      {/* Your App Logic */}
      <PushUniversalAccountButton uid='applevel' />
    </PushUniversalWalletProvider>
  );
}
LIVE APP PREVIEW
Override Order

Top‑level properties apply to both themes; then light and dark objects override those values when the corresponding theme is active.

List of Supported Theme Variables

Global Overrides

Use these tokens for settings that should apply regardless of theme:

CategoryVariableDefault
Typography & Layout--pw-core-font-familyFK Grotesk Neu
--pw-core-text-size26px
Spacing & Border--pw-core-list-spacing12px
--pw-core-modal-border2px
--pw-core-modal-border-radius24px
--pw-core-modal-width376px
--pw-core-modal-padding24px
--pw-core-btn-border-radius12px
--pwauth-btn-connect-border-radius12px

Colors

These tokens have different defaults in light vs. dark themes:

VariableDefault (Light)Default (Dark)
--pw-core-brand-primary-color

#D548EC

#CF59E2

--pw-core-text-primary-color

#17181B

#F5F6F8

--pw-core-text-secondary-color

#313338

#C4CBD5

--pw-core-text-tertiary-color

#8C93A0

#757D8D

--pw-core-text-link-color

#C742DD

#CF59E2

--pw-core-text-disabled-color

#B0B3B9

#757D8D

--pw-core-bg-primary-color

#F5F6F8

#17181B

--pw-core-bg-secondary-color

#FFFFFF

#202124

--pw-core-bg-tertiary-color

#EAEBF2

#313338

--pw-core-bg-disabled-color

#EAEBF2

#313338

--pw-core-success-primary-color

#00A47F

#51DCBD

--pw-core-error-primary-color

#D43B3B

#FFB1B1

--pw-core-modal-border-color

#CF59E2

#D548EC

--pw-core-btn-primary-bg-color

#D548EC

#D548EC

--pw-core-btn-primary-text-color

#FFFFFF

#FFFFFF

--pwauth-btn-connect-text-color

#FFFFFF

#FFFFFF

--pwauth-btn-connect-bg-color

#D548EC

#D548EC

--pwauth-btn-connected-text-color

#FFFFFF

#FFFFFF

--pwauth-btn-connected-bg-color

#000000

#000000

Next Steps