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
| Prop | Type | Description |
|---|---|---|
chain | Chain | Specifies the blockchain network to connect to. |
rpcUrl | string | The RPC endpoint used for blockchain interactions. |
children | React.ReactNode | The wrapped components inside the provider. |
colorMode | "light" | "dark" | Sets the theme mode (light or dark). Defaults to system preference. |
config | CreateConfigParameters | Custom configuration settings for ComposerKit. |
Notes
- If
chainandrpcUrlare not provided, ComposerKit will use default settings. - The
colorModeprop allows switching between dark and light themes easily.
By using ComposerKitProvider, you ensure that all ComposerKit components work seamlessly within your application.