React useful libraries

PHOTO EMBED

Mon Feb 10 2025 12:56:24 GMT+0000 (Coordinated Universal Time)

Saved by @StephenThevar #react.js

1) React Toast
for toast notififcation

2) React Spring (it is a cool lib) - https://react-spring.dev/
for animation --- npm i @react-spring/web

3) react-transition-group
for tailwind transition 

4) clsx + tailwindmerge = cn
for conditional class
  ------------------------------
  import clsx, { ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";

export function cn(...classes: ClassValue[]) {
  return twMerge(clsx(...classes));
}
===================================

5) cva 
class-variant-authority

6) shadcn
component library

7) floating-ui - https://floating-ui.com/
for floating tooltip. I think it was previously called popper.js
npm install @floating-ui/react

8) DOMPurify - npm i dompurify
Dompurify is a JavaScript library that provides a fast and secure way to purify HTML content.
It is specially designed to prevent Cross-Site Scripting (XSS) attacks by eliminating any potentially harmful scripts from user input.
Dompurify accomplishes this by parsing the HTML and DOM elements, filtering out unsafe tags and attributes, and ensuring that only safe content is concluded on the web page.

9) TipTap - https://tiptap.dev/docs - look for Editor 
npm install @tiptap/react @tiptap/pm @tiptap/starter-kit
Tiptap lets you create a fully customizable rich text editor using modular building blocks. It offers a range of open-source and Pro extensions, allowing you to configure every part of the editor with a few lines of code. The API lets you customize and extend editor functionality.

10) React Hook Form - https://www.react-hook-form.com/
npm install react-hook-form

11) react-responsive - npm i react-responsive
for useMediaQuery

12) millionjs millionlint

13) open editor - https://github.com/zjxxxxxxxxx/open-editor
npm i @open-editor/vite -D

14) React Scan - https://react-scan.com/monitoring
npm i react-scan

15) usehooks-ts - usehooks-ts.com
npm I usehooks-ts

16) https://react-select.com/home#getting-started
npm i --save react-select

17) @open-editor/vite - https://npm.io/package/@open-editor/vite
for locating the code in vscode via browser

18) https://headlessui.com/
for accordians and popovers
content_copyCOPY