Fork of rtCamp frappe-ui-react with TMPTech UI contributions (Table, Pagination, Drawer, EmptyState, Badge amber/violet)
  • TypeScript 91.3%
  • CSS 7.7%
  • JavaScript 0.5%
  • HTML 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
sione 57c2acafbc
Some checks failed
Deploy Storybook to GitHub Pages / build (push) Has been cancelled
Deploy Storybook to GitHub Pages / deploy (push) Has been cancelled
Merge pull request 'feat: port Table, Pagination, Drawer, EmptyState; fix Badge themes' (#1) from feat/ui-contributions into main
2026-09-26 10:58:28 +02:00
.github docs: require discussion issue before new component PRs 2026-06-19 16:37:40 +05:30
.husky Migrate Husky configuration from v8 to v9 format 2026-02-04 11:51:16 +05:30
.storybook chore: bumb package version 2026-04-29 16:53:43 +05:30
bin fix: update bach commands 2026-02-04 11:55:05 +05:30
packages/frappe-ui-react feat: port Table, Pagination, Drawer, EmptyState; fix Badge themes 2026-09-26 21:06:38 +13:00
public Initial Commit 2025-07-16 13:55:00 +05:30
tests chore: delete loadah isEqual 2026-02-04 12:34:35 +05:30
.editorConfig chore: add final newline 2026-02-04 11:53:46 +05:30
.gitignore Update package and ts config, build with tsc for publishing, remove unrequired files, and reorganize files 2025-10-06 10:57:50 +05:30
.npmrc chore: eol fix 2026-02-04 11:55:04 +05:30
.nvmrc chore: update nvmrc and readme 2026-04-28 11:29:06 +05:30
.prettierignore chore: add final newline 2026-02-04 11:53:46 +05:30
.prettierrc Add Prettier config 2026-02-04 11:49:54 +05:30
babel.config.cjs chore: remove unnecessary dependencies 2026-04-15 14:43:58 +05:30
CONTRIBUTING.md chore: update contribuiting 2026-02-04 11:55:05 +05:30
eslint.config.js chore: format 2026-02-04 12:56:01 +05:30
GETTING-STARTED.md chore: add missed tiptap mention 2026-02-04 12:34:37 +05:30
LICENSE Change license. 2025-09-19 15:18:16 +05:30
package.json fix: resolve pnpm audit vulnerabilities 2026-06-17 11:13:00 +05:30
pnpm-lock.yaml fix: resolve pnpm audit vulnerabilities 2026-06-17 11:13:00 +05:30
pnpm-workspace.yaml chore: eol fix 2026-02-04 11:55:04 +05:30
preview-styles.css Fix style issues 2026-02-04 11:47:36 +05:30
README.md chore: add missed tiptap mention 2026-02-04 12:34:37 +05:30
README.mdx Fix styles 2025-10-29 14:44:54 +05:30
tsconfig.app.json fix: tsconfig for build 2026-02-04 11:55:36 +05:30
tsconfig.json fix: ts config file for src files 2026-02-04 11:51:18 +05:30
tsconfig.node.json fix: lint:types script 2026-02-04 11:55:36 +05:30
vite.config.ts Update dependency overrides 2026-06-04 15:37:43 +05:30
vitest.shims.d.ts Run prettier and separate dependencies 2025-10-10 15:25:54 +05:30

Frappe UI React

ESLint Prettier License

Frappe UI React is a modern component library designed for building frontend applications in React, specifically tailored for the Frappe Framework. It is inspired by the original frappe-ui, which is created in Vue, offering a similar components and aesthetic in React. However, we are not limited to a one-to-one port and also provide a growing collection of custom-built components to give developers more power and flexibility.

Prerequisites

  • Node.js v20
  • TailwindCSS v4

Usage

You can set up frappe-ui-react in your existing Frappe app with the following simple steps. You can also spin up a new project instantly using the frappe-ui-react-starter template.

Step 1: Installation

Install the packages.

npm install @rtcamp/frappe-ui-react

OR

pnpm add @rtcamp/frappe-ui-react

Step 2: Configuration

Import the theme CSS directly into your project (e.g., in index.css) and provide the source of the frappe-ui-react or the package where it is imported so that it picks the styles automatically.

@import '@rtcamp/frappe-ui-react/theme';
@source "../../node_modules/@rtcamp/frappe-ui-react/dist";

Tailwind @source directive explicitly specifies source files that aren't picked up by Tailwind's automatic content detection.

(Tailwind v3 usage):

If you are using a Tailwind v3 configuration, you should take two steps:

  • Import the theme-v3 CSS into your index.css file, and ensure that index.css is then imported in your index.tsx.

  • Import the Tailwind configuration from frappe-ui-react and either use it as a preset or extend your existing configuration.

/* index.css */
@import '@rtcamp/frappe-ui-react/theme-v3';
// tailwind.config.js in your project
module.exports = {
  presets: [
    require('@rtcamp/frappe-ui-react/tailwind/preset')
  ],
  content: [
    path.resolve(__dirname, "./node_modules/@rtcamp/frappe-ui-react/dist/**/*.{tsx,jsx,ts,js}")
  ]
  // Additional configuration...
}

Step 3: Import and Use Components

You can now import components and use them in your project.

import './index.css';
import { Button } from "@rtcamp/frappe-ui-react";

function App() {
  return (
    <div className="app-container">
      <Button 
        label="Default Button"
        theme="gray"
        size="md"
        variant="subtle" 
      />
    </div>
  );
}

export default App;

Under the Hood

This library is built on top of several excellent open-source projects:

  • TailwindCSS: Utility-first CSS framework for building design system-based UIs.
  • Headless UI: Unstyled and accessible UI components.
  • Radix UI: Low-level, unstyled, and accessible UI primitives.
  • dayjs: Lightweight JavaScript library for working with dates.
  • TipTap: Headless Text Editor

Inspiration & Credits

This project, Frappe UI React, is heavily inspired by the original Frappe UI project. Frappe UI is a fantastic Vue.js component library, and our goal with Frappe UI React is to bring a similar aesthetic and component experience to the React ecosystem.