Skip to content

karkigrishmin/stacks-kit-example

Repository files navigation

stacks-kit Example

A minimal example app demonstrating stacks-kit - the React toolkit for Stacks blockchain.

Quick Start

# Clone and install
git clone https://github.com/karkigrishmin/stacks-kit-example.git
cd stacks-kit-example
npm install

# Run dev server
npm run dev

Open http://localhost:5173 in your browser.

What This Example Shows

  • Setting up StacksKitProvider
  • Using ConnectButton for wallet connection
  • Displaying wallet info with AddressDisplay, BalanceDisplay, NetworkBadge
  • Using useWallet hook for wallet state

Key Files

  • src/main.tsx - Imports stacks-kit/styles.css
  • src/App.tsx - Uses stacks-kit components and hooks

Create Your Own

# 1. Create a React project
npm create vite@latest my-stacks-app -- --template react-ts
cd my-stacks-app

# 2. Install stacks-kit
npm install stacks-kit @stacks/connect @stacks/transactions @stacks/network

# 3. Import styles in main.tsx
# import 'stacks-kit/styles.css'

# 4. Use components
import { StacksKitProvider, ConnectButton } from 'stacks-kit'

function App() {
  return (
    <StacksKitProvider>
      <ConnectButton />
    </StacksKitProvider>
  )
}

Learn More

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published