githubEdit

Theming

This guide explains how to customize the VeChain Kit theme to match your app's design.

Quick Start

The theme system is designed to be simple - you only need to provide a base modal.backgroundColor and textColor, and all other colors are automatically derived. You can optionally customize specific aspects like overlay, buttons, and glass effects.

<VeChainKitProvider
    theme={{
        modal: {
            backgroundColor: isDarkMode ? '#1f1f1e' : '#ffffff',
        },
        textColor: isDarkMode ? 'rgb(223, 223, 221)' : '#2e2e2e',
        overlay: {
            backgroundColor: 'rgba(0, 0, 0, 0.6)',
            blur: 'blur(3px)',
        },
        buttons: {
            secondaryButton: {
                bg: 'rgba(255, 255, 255, 0.1)',
                color: '#ffffff',
                border: 'none',
            },
        },
        effects: {
            glass: {
                enabled: true,
                intensity: 'low',
            },
        },
    }}
    // ... other props
>
    {children}
</VeChainKitProvider>

Simplified API

The theme configuration has been simplified to focus on what matters most:

Base Colors

  • modal.backgroundColor (optional) - Base background color for the modal. Automatically derives:

    • Modal background (100% opacity)

    • Card background (80% opacity)

    • Sticky header background (90% opacity)

    • Secondary/tertiary colors (with opacity overlays)

    • Border colors

  • textColor (optional) - Base text color. Automatically derives:

    • Primary text (100% opacity)

    • Secondary text (70% opacity)

    • Tertiary text (50% opacity)

Overlay Configuration

Customize the modal overlay independently:

Complete Example

Here's a complete example with glass effects:

Last updated

Was this helpful?