npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

basit-ui

v0.1.2

Published

A reusable React and Tailwind CSS admin framework and UI library

Downloads

425

Readme

Basit UI

Basit UI is a professional, reusable React & Tailwind CSS admin framework extracted from the Ispahani Banglabid project.

It is designed similarly to Shadcn UI: instead of importing bloated npm modules, you use a CLI to scaffold the exact code into your project (src/components/basit-ui/...), giving you 100% control over the styling, layout, and logic.

It provides a complete Layout system, Access Control, generic Tables, Forms, Modals, and Dashboard widgets out of the box. The default theme uses the exact Ispahani Color Palette (brand-green, brand-orange).

📦 Installation (CLI Scaffolding)

Instead of installing basit-ui as a standard runtime dependency, you use npx to add the raw components into your project.

1. Initialize your Tailwind Config

Ensure your project has the required colors. Update your tailwind.config.ts (or globals.css if using Tailwind v4):

@theme {
  --color-primary: #0a7c3f; /* Ispahani brand-green */
  --color-brand-green: #0a7c3f;
  --color-brand-orange: #f26422;
  --background: #ffffff;
  --foreground: #171717;
}

2. Scaffold Components

Run the CLI directly in your terminal to copy the modules you want. The files will be placed in src/components/basit-ui/.

# Add the core responsive Sidebar, Header, and Admin Layout
npx basit-ui@latest add layout

# Add the dummy data (including the Ispahani Menu items) and shared types
npx basit-ui@latest add shared

# Add the advanced Role-Based Access Control wrappers
npx basit-ui@latest add access-control

# Add the powerful Table component (with built-in pagination & actions)
npx basit-ui@latest add components/table

# Add complete modules (like the Role Management page)
npx basit-ui@latest add modules/role-management

(Note: Ensure you have lucide-react and clsx/tailwind-merge installed in your project).


🚀 Quick Start: Building your Admin Panel

Once you've run the scaffolding commands above, the components are sitting directly in your source code. Here is how you wire them together.

1. Setup the Layout (src/app/ClientLayout.tsx)

Use the locally scaffolded AdminLayout and AccessProvider. You can pass in the pre-configured dummyMenu we scaffolded in the shared folder!

"use client";

import { usePathname } from "next/navigation";
import Link from "next/link";
import { AdminLayout } from "../components/basit-ui/layout/AdminLayout";
import { AccessProvider } from "../components/basit-ui/access-control/AccessProvider";
import { dummyMenu } from "../components/basit-ui/shared/dummy-data/menu";
import { User } from "../components/basit-ui/shared/types";

// Mock logged-in user
const dummyUser: User = {
  id: "1",
  name: "Super Admin",
  email: "[email protected]",
  role: { id: "admin", name: "SUPER_ADMIN", permissions: [] },
};

export function ClientLayout({ children }: { children: React.ReactNode }) {
  const pathname = usePathname();

  return (
    <AccessProvider user={dummyUser}>
      <AdminLayout
        user={dummyUser}
        items={dummyMenu as any}
        pathname={pathname}
        brandName="ISPAHANI"
        brandSubtitle="বাংলাবিদ"
        linkComponent={Link as any}
      >
        {children}
      </AdminLayout>
    </AccessProvider>
  );
}

2. Create a Page using the Scaffoled Table (src/app/users/page.tsx)

You have full access to BasitTable now. Since it's in your repository, you can customize the table's exact CSS whenever you want.

"use client";

import { PageContainer } from "../../components/basit-ui/layout/PageContainer";
import { BasitTable } from "../../components/basit-ui/components/table/BasitTable";
import { TableActions } from "../../components/basit-ui/components/table/TableActions";
import { dummyUsers } from "../../components/basit-ui/shared/dummy-data/users";

export default function UsersPage() {
  const columns = [
    { key: "name", label: "Name" },
    { key: "email", label: "Email" },
    { key: "role.name", label: "Role", render: (user: any) => user.role?.name },
    { key: "status", label: "Status", render: () => "Active" },
    { 
      key: "actions", 
      label: "Actions", 
      className: "text-right",
      render: (user: any) => (
        <div className="flex justify-end">
          <TableActions 
            onEdit={() => console.log("Edit", user.id)}
            onDelete={() => console.log("Delete", user.id)}
          />
        </div>
      )
    },
  ];

  return (
    <PageContainer title="User Management" description="Manage all users.">
      <div className="bg-white rounded-xl shadow-sm border border-slate-200 overflow-hidden">
        <BasitTable
          columns={columns}
          data={dummyUsers}
          keyExtractor={(item: any) => item.id}
        />
      </div>
    </PageContainer>
  );
}

3. Protecting Routes or Components

Use PermissionGuard (which is now stored locally at src/components/basit-ui/access-control/PermissionGuard.tsx) to hide buttons from unauthorized users.

import { PermissionGuard } from "../../components/basit-ui/access-control/PermissionGuard";

export function RestrictedButton() {
  return (
    <PermissionGuard action="delete" subject="users" fallback={<p>No Access</p>}>
      <button className="bg-red-500 text-white">Delete User</button>
    </PermissionGuard>
  );
}

🛠 Customization

Because Basit UI acts like Shadcn UI, you own the code.

Want to change the gap between the child menu items in the Sidebar? Just open src/components/basit-ui/layout/Sidebar.tsx and adjust the Tailwind classes (e.g. change space-y-1 to space-y-2)! There are no hidden npm modules restricting you.