Gathering detailed insights and metrics for @paalan/react-ui
Gathering detailed insights and metrics for @paalan/react-ui
Gathering detailed insights and metrics for @paalan/react-ui
Gathering detailed insights and metrics for @paalan/react-ui
Reusable react ui components with build on top of Tailwind CSS and Shadcn UI. In this package, We customize the Tailwind CSS and Shadcn UI to make it more user-friendly and easy to use.
npm install @paalan/react-ui
Typescript
Module System
Min. Node Version
Node Version
NPM Version
62.7
Supply Chain
88.2
Quality
85.6
Maintenance
100
Vulnerability
99.3
License
@paalan/react-shared@1.4.11
Published on 21 Oct 2024
@paalan/react-shared@1.4.10
Published on 21 Oct 2024
@paalan/react-ui@1.4.14
Published on 20 Oct 2024
@paalan/react-shared@1.4.9
Published on 20 Oct 2024
@paalan/react-shared@1.4.8
Published on 13 Oct 2024
@paalan/react-shared@1.4.7
Published on 13 Oct 2024
TypeScript (93.38%)
MDX (5.27%)
CSS (1.11%)
JavaScript (0.19%)
Shell (0.02%)
HTML (0.02%)
Total Downloads
3,568
Last Day
5
Last Week
19
Last Month
117
Last Year
3,568
164 Commits
1 Watching
4 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
1.4.14
Package Id
@paalan/react-ui@1.4.14
Unpacked Size
28.70 MB
Size
4.35 MB
File Count
437
NPM Version
10.5.0
Node Version
20.12.2
Publised On
20 Oct 2024
Cumulative downloads
Total Downloads
Last day
0%
5
Compared to previous day
Last week
-36.7%
19
Compared to previous week
Last month
265.6%
117
Compared to previous month
Last year
0%
3,568
Compared to previous year
41
This package contains the components for the Paalan shadcn React UI Components. We customize the components from the Shadcn UI package and add some additional components and styles to the package.
1npm install @paalan/react-ui @paalan/react-config @paalan/react-shared @paalan/react-icons @paalan/react-hooks @paalan/react-providers
First, You need to create a tailwind.config.js
file in the root of your project and add the following configuration.
1import tailwindConfig from '@paalan/react-config/tailwind'; 2 3/** @type {import('tailwindcss').Config} */ 4export default { 5 presets: [tailwindConfig], 6 content: [ 7 './src/**/*.{js,ts,jsx,tsx,mdx}', 8 './node_modules/@paalan/react-ui/**/*.{js,ts,jsx,tsx}', 9 './node_modules/@paalan/react-icons/**/*.{js,ts,jsx,tsx}', 10 './node_modules/@paalan/react-shared/**/*.{js,ts,jsx,tsx}', 11 ], 12 13 // Project-specific customizations 14 theme: { 15 //... 16 }, 17};
Second, you need to import the @paalan/react-ui/styles.css
styles from the package in your project root App.tsx
file or index.tsx
file.
1import '@paalan/react-ui/styles.css'; // Import the package styles in the top of the root file and after import your local styles css file. 2import './globals.css'; // Import your global styles
Note: You need to load fonts from Google Fonts in your project. Add the following line in your globals.css
file or styles.css
file.
1@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap'); 2 3@tailwind base; 4@tailwind components; 5@tailwind utilities; 6 7* { 8 @apply border-border; 9}
ThemeProvider
component from @paalan/react-providers/ThemeProvider
and use them in your project.1import "@paalan/react-ui/styles.css"; // Import the styles from the package 2 3import React from 'react'; 4import ReactDOM from 'react-dom/client'; 5import { ThemeProvider } from '@paalan/react-providers/ThemeProvider'; 6 7import { App } from './App'; 8 9const root = ReactDOM.createRoot(document.getElementById('root')!); 10 11const Root = () => { 12 return ( 13 <React.StrictMode> 14 <ThemeProvider> 15 <App /> 16 </ThemeProvider> 17 </React.StrictMode> 18 ); 19}; 20 21root.render(<Root />);
useTheme
hook from the @paalan/react-providers/ThemeProvider
and use them in your project.1import { useTheme } from '@paalan/react-providers/ThemeProvider'; 2 3export const App = () => { 4 const theme = useTheme(); 5 6 return ( 7 <div style={{ backgroundColor: theme.isDark ? 'black' : 'white' }}> 8 <h1 style={{ color: theme.isDark ? 'white' : 'black' }}>Hello, World!</h1> 9 </div> 10 ); 11};
NextThemeProvider
component from @paalan/react-providers/NextThemeProvider
and use them in your project.1import '@paalan/react-ui/styles.css'; // Import the styles from the package 2 3import { NextThemeProvider } from '@paalan/react-providers/NextThemeProvider'; 4 5import { App } from './App'; 6 7const Root = () => { 8 return ( 9 <NextThemeProvider> 10 <App /> 11 </NextThemeProvider> 12 ); 13}; 14 15export default Root;
useNextTheme
hook from @paalan/react-providers/NextThemeProvider
and use them in your project.1import { useNextTheme } from '@paalan/react-providers/NextThemeProvider'; 2 3export const App = () => { 4 const theme = useNextTheme(); 5 6 return ( 7 <div style={{ backgroundColor: theme.isDark ? 'black' : 'white' }}> 8 <h1 style={{ color: theme.isDark ? 'white' : 'black' }}>Hello, World!</h1> 9 </div> 10 ); 11};
Button
component from the package and use them in your project.1import { Button } from '@paalan/react-ui'; 2 3<Button variant="solid" color="primary" size="md" disabled> 4 Click me 5</Button> 6 7<Button variant="solid" color="secondary" size="lg"> 8 Click me 9</Button>
Box
component from the package and use them in your project.1import { Box } from '@paalan/react-ui'; 2 3<Box bg="primary" p="4"> 4 Hello world 5</Box>;
Container
component from the package and use them in your project.1import { Container } from '@paalan/react-ui'; 2 3<Container>Hello world</Container>;
No vulnerabilities found.
No security vulnerabilities found.