ComposerKitProvider – Composer Kit
Skip to content

ComposerKitProvider

Overview

The ComposerKitProvider component is essential for integrating ComposerKit into your app. It ensures that all ComposerKit components work properly by wrapping your application with the necessary configurations.

Usage

Wrap your application with ComposerKitProvider to enable ComposerKit components throughout your app.

import { ComposerKitProvider } from "@composer-kit/ui/core";
 
export default function Providers({ children }: { children: React.ReactNode }) {
  return <ComposerKitProvider>{children}</ComposerKitProvider>;
}

Props

ComposerKitProvider

PropTypeDescription
chainChainSpecifies the blockchain network to connect to.
rpcUrlstringThe RPC endpoint used for blockchain interactions.
childrenReact.ReactNodeThe wrapped components inside the provider.
colorMode"light" | "dark"Sets the theme mode (light or dark). Defaults to system preference.
configCreateConfigParametersCustom configuration settings for ComposerKit.

Notes

  • If chain and rpcUrl are not provided, ComposerKit will use default settings.
  • The colorMode prop allows switching between dark and light themes easily.

By using ComposerKitProvider, you ensure that all ComposerKit components work seamlessly within your application.