Skip to main content

Theming

Usage

Wrap your composable component with Web3ModalTheme

import com.walletconnect.web3.modal.ui.Web3ModalTheme

Web3ModalTheme(
mode = Web3ModalTheme.Mode.AUTO || Web3ModalTheme.Mode.LIGHT || Web3ModalTheme.Mode.DARK,
lightColors = Web3ModalTheme.provideLightWeb3ModalColors(
// Override colors
),
darkColors = Web3ModalTheme.provideDarkWeb3ModalColors(
// Override colors
)
) {
/* any Web3Modal component or graph */
}

Mode

    enum class Mode {
LIGHT, DARK, AUTO
}

Colors

Customizable colors in Web3ModalTheme. To override colors you need to use methods Web3ModalTheme.provideLightWeb3ModalColors or Web3ModalTheme.provideDarkWeb3ModalColors To override foreground or background ColorPalette you can define new palette or use one of the Web3ModalTheme methods to provide Palette and override selected colors

    interface Colors {
val accent100: Color
val accent90: Color
val accent80: Color
val foreground: ColorPalette
val background: ColorPalette
val grayGlass: Color
val success: Color
val error: Color
}

ColorPalette

    data class ColorPalette(
val color100: Color,
val color125: Color,
val color150: Color,
val color175: Color,
val color200: Color,
val color225: Color,
val color250: Color,
val color275: Color,
val color300: Color,
)