# @peersky/next-web3-chakra

> Web3 enabled react components made for nextjs and chakra ui

Latest version **0.5.11** (published 2025-09-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @peersky/next-web3-chakra
pnpm add @peersky/next-web3-chakra
yarn add @peersky/next-web3-chakra
bun add @peersky/next-web3-chakra
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 0.5.11 |
| Published | 2025-09-07 |
| First published | 2022-09-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 27 |
| Unpacked size | 5.9 MB |
| Known vulnerabilities | 0 (+60 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Peersky |
| Maintainers | peersky |

## Links

- npm: https://www.npmjs.com/package/@peersky/next-web3-chakra
- Repository: https://github.com/peersky/daococoa
- Homepage: https://github.com/peersky/daococoa/tree/main/packages/next-web3-chakra#readme
- npm.io page: https://npm.io/package/@peersky/next-web3-chakra

## Dependencies (27)

- [next](https://npm.io/package/next.md) 13.2.1
- [uuid](https://npm.io/package/uuid.md) ^8.3.2
- [web3](https://npm.io/package/web3.md) ^1.8.2
- [axios](https://npm.io/package/axios.md) 1.3.4
- [react](https://npm.io/package/react.md) ^18.2.0
- [moment](https://npm.io/package/moment.md) ^2.29.1
- [core-js](https://npm.io/package/core-js.md) ^3.19.1
- [nprogress](https://npm.io/package/nprogress.md) ^0.2.0
- [papaparse](https://npm.io/package/papaparse.md) ^5.3.2
- [react-ace](https://npm.io/package/react-ace.md) ^10.1.0
- [react-dom](https://npm.io/package/react-dom.md) ^18.2.0
- [remark-gfm](https://npm.io/package/remark-gfm.md) ^3.0.1
- [web3-utils](https://npm.io/package/web3-utils.md) ^1.8.2
- [react-icons](https://npm.io/package/react-icons.md) ^4.3.1
- [react-query](https://npm.io/package/react-query.md) ^3.18.1
- [framer-motion](https://npm.io/package/framer-motion.md) ^6.5.1
- [@emotion/react](https://npm.io/package/@emotion/react.md) ^11.10.6
- [react-dropzone](https://npm.io/package/react-dropzone.md) ^14.2.3
- [@emotion/styled](https://npm.io/package/@emotion/styled.md) ^11.10.6
- [react-json-view](https://npm.io/package/react-json-view.md) ^1.21.3
- [@chakra-ui/icons](https://npm.io/package/@chakra-ui/icons.md) ^2.0.17
- [@chakra-ui/react](https://npm.io/package/@chakra-ui/react.md) ^2.5.1
- [@stripe/stripe-js](https://npm.io/package/@stripe/stripe-js.md) ^1.16.0
- [react-pro-sidebar](https://npm.io/package/react-pro-sidebar.md) ^1.0.0
- [styled-components](https://npm.io/package/styled-components.md) ^5.3.6
- [@chakra-ui/next-js](https://npm.io/package/@chakra-ui/next-js.md) ^2.0.1
- [@choc-ui/chakra-autocomplete](https://npm.io/package/@choc-ui/chakra-autocomplete.md) ^5.1.4

## Recent versions

- 0.5.11 (latest) — 2025-09-07
- 0.5.10 — 2025-09-07
- 0.5.9 — 2025-09-07
- 0.5.8 — 2025-09-07
- 0.5.7 — 2025-09-07
- 0.5.6 — 2025-09-07
- 0.5.4 — 2025-09-07
- 0.5.3 — 2023-09-11
- 0.5.2 — 2023-09-11
- 0.5.1 — 2023-09-11
- 0.4.1 — 2023-09-03
- 0.4.0 — 2023-09-03
- 0.3.8 — 2023-08-23
- 0.3.7 — 2023-08-23
- 0.3.6 — 2023-08-23
- … 30 more at https://npm.io/package/@peersky/next-web3-chakra/versions

## README

## Web3 react components for Chakra on Next

React(18) components for chakra(2) using next(13).

This is a website building bricks package such as navbar, footer, cards, layouts etc.

It is intended to be used for Web3 specific projects - grants you a web3 provider interface, chain selector drop down, and allows to build generic smart contract interface by just pointing address and ABI. How cool is that?

### Use case

https://peersky.github.io/daococoa/

### How to use

#### Getting started

Install `yarn add @peersky/next-web3-chakra`

Create `config.ts` that has exports SITEMAP:

```
import { SiteMap, SiteMapItemType } from "@peersky/next-web3-chakra/dist/types";
export const SITEMAP: SiteMap = [
  {
    title: "Blog",
    path: "/blog",
    type: SiteMapItemType.CONTENT,
  }]
```

create your theme. Here is how you start with default theme:

```jsx
import { default as defaultTheme } from "@peersky/next-web3-chakra/dist/theme/";

import { extendTheme } from "@chakra-ui/react";

const theme = extendTheme({
  ...defaultTheme,
  //Here can override library theme items
});

export default theme;
```

Wrap your application:

```jsx
import { UIProvider, Web3Provider } from "@peersky/next-web3-chakra/dist/providers";
import { SITEMAP } from "./config";
import theme from "./theme";
....
 <ChakraProvider theme={theme}>
      {/* <Fonts /> */}
      <Web3Provider>
        <UIProvider config={{ SITEMAP: SITEMAP }}>{props.children}</UIProvider>
      </Web3Provider>
</ChakraProvider>
```

#### Layouts

This package does not use next13 layouts. Instead old fashioned way is preserved. Use as follows to ensure items defined in layouts do not rerender when you switch between pages:

```js
import { getLayout } from "@peersky/next-web3-chakra/dist/layouts/BlogLayout";
const Blog = <div>lorem<div>
Blog.getLayout = getLayout();
export default Blog;
```

#### Components

Import from `@peersky/next-web3-chakra/dist/components` see inside repository for more details

#### Providers

Import from `@peersky/next-web3-chakra/dist/providers`

UI Provider gives you general information about state of UI:

```ts
export interface UIProviderInterface {
  sidebarVisible: boolean | undefined;
  searchBarActive: boolean | undefined;
  isMobileView: boolean | undefined;
  sidebarCollapsed: boolean | undefined;
  sidebarToggled: boolean | undefined;
  searchTerm: string | undefined;
  setSearchBarActive: Function;
  setSidebarCollapsed: Function;
  setSearchTerm: Function;
  setSidebarToggled: Function;
  setSidebarVisible: Function;
  sessionId: string | undefined;
  webSiteConfig: WebSiteConfig;
}
```

Web3 Provider gives a convinient access to blockchain related operations:

```ts
export interface Web3ProviderInterface {
  web3: Web3; //web3js
  onConnectWalletClick: Function;
  buttonText: String;
  WALLET_STATES: WalletStatesInterface; //onboard/conect/connected/unknown-chain
  account: string; //address
  chainId: number;
  defaultTxConfig: Object;
  // signAccessToken: Function;
  getMethodsABI: typeof GetMethodsAbiType; //Takes contract ABI and returns method with given name
  changeChain: typeof ChangeChain; //Request wallet to switch chain
  targetChain: ChainInterface | undefined; //Desired chain
  getChainFromId: typeof getChainFromId; //Read chain name from chain id
}
```

### Why there is no <you_name_it>

Author works on this package for pure enthusiasm. If you want to contribute or request a feature: please contact on github:
https://github.com/peersky/daococoa/issues

### Fund

You can fund this project to make it more fun.

---
_Source: https://npm.io/package/@peersky/next-web3-chakra · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
