Installation

Requirements

  • Node.js 16+
  • React 16.8+ or Next.js 12+
  • Tailwind CSS 3.0+

Install

Via npx (Recommended)

bash
npx devfund@latest card

Global Install

bash
npm install -g devfund
devfund card

Dev Dependency

bash
npm install --save-dev devfund
npx devfund card

Setup

Next.js (Already Set Up)

Most Next.js projects work out of the box. Just ensure your globals.css imports Tailwind:

css
@tailwind base;
@tailwind components;
@tailwind utilities;

React + Vite

bash
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

Update tailwind.config.js:

js
module.exports = {
  content: ["./src/**/*.{js,jsx,ts,tsx}"],
  theme: { extend: {} },
  plugins: [],
};

Import in your CSS:

css
@tailwind base;
@tailwind components;
@tailwind utilities;

Verify

bash
npx devfund@latest card

You should see the component created in components/devfund/CardPaymentQR.tsx

Next: Learn Usage →