michael-gee / gee-ui

Single source of truth component library for all things shadcn/ui
https://gee-ui.com
MIT License
2 stars 0 forks source link
components radix react shadcn tailwind typescript

@gee-ui/react

React (TypeScript) component library which serves as a wrapper library around shadcn/ui. Unlock the same ease of use and customization for all components but with a single source of truth library.

shadcn has been the go-to choice for a ton of React applications, after using it within multiple projects I came across 3 problems which this library aims to solve:

1. Dependency management

There are a lot of times where you have to install dependencies like Radix to get the components working end-to-end. These dependencies can quickly add up leaving you with the responsibility to maintain these dependencies over time. Instead of maintaining 10+ dependencies wouldn't it be nice to just maintain one?

Before


"@radix-ui/react-avatar": "^1.0.4",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-popover": "^1.0.7",
"@radix-ui/react-scroll-area": "^1.0.5",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-switch": "^1.0.3",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"date-fns": "^3.6.0",
"lucide-react": "^0.368.0",
"react-day-picker": "^8.10.1",
"tailwind-merge": "^2.2.2",
"tailwindcss-animate": "^1.0.7",
... etc. hopefully you get my point

After

"@gee-ui/react": "^1.0.0"

2. Duplication of the same work in multiple projects

The problem above multiplies over time especially if you use it in multiple projects.

A big inspiration for this library is the React 19 release ref as a prop change. This is a long awaited change especially for someone who uses react-hook-form which relies on refs to coordinate form changes. The only thing I dread about these changes is the amount of components I will have to remove forwardRef from.

Before

Large Github pull request

After

"@gee-ui/react": "^1.0.0"" -> "@gee-ui/react": "^2.0.0"

3. Additional opt-in functionality & features

For good reason shadcn keeps most components minimal giving users the flexibility to build on top of them. This library aims to not only provide those minimal components but also opt-in batteries included components as well.