Learn what AGW Reusables is and how to install it.
AGW Reusables is a collection of components and utilities for building applications on Abstract. It allows you to add features, components, and utilities to your application using single commands, with only one requirement: your app must use Next.js .
Built on top of the shadcn/ui library, AGW Reusables uses the shadcn CLI to add snippets of code to your project and install any required dependencies to use them.
Watch the demo video below for an overview and a guide to getting started.
Follow the steps below to start using AGW Reusables.
Create a new project or configure an existing one using the shadcn init
command:
pnpm dlx shadcn@latest init
Install the required wrapper component, the AGW Provider:
pnpm dlx shadcn@latest add "https://build.abs.xyz/r/agw-provider.json"
Wrap your application in the installed component inside app/layout.tsx
.
import { NextAbstractWalletProvider } from "@/components/agw-provider";
import { Toaster } from "@/components/ui/sonner";
import "./globals.css";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<NextAbstractWalletProvider>
<body>
{children}
<Toaster />
</body>
</NextAbstractWalletProvider>
</html>
);
}