@wazobiatech/wazui
v2.6.3
Published
`@wazobiatech/wazui` is a React component library that provides a set of reusable UI components, hooks, and providers for building modern web applications. It is built with TypeScript, Tailwind CSS, and integrates Shadcn UI components.
Downloads
3,532
Readme
Wazui Component Library
@wazobiatech/wazui is a React component library that provides a set of reusable UI components, hooks, and providers for building modern web applications. It is built with TypeScript, Tailwind CSS, and integrates Shadcn UI components.
Table of Contents
Installation
To use the Wazui component library, you need to have a React project set up.
Install the package:
npm install @wazobiatech/wazuiInstall peer dependencies:
This package has peer dependencies that need to be installed in your project.
npm install react react-dom @tanstack/react-query @tanstack/react-query-devtools
Usage
1. Import Styles
For the components to be styled correctly, import the CSS file into your main application file (e.g., index.tsx or App.tsx).
import '@wazobiatech/wazui/styles.css';2. Set up Providers
The library includes providers for theme and data fetching. Wrap your application with them.
// In your main App component
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import { WazUIThemeProvider, WazUIQueryProvider } from '@wazobiatech/wazui';
import '@wazobiatech/wazui/styles.css';
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<WazUIQueryProvider>
<WazUIThemeProvider defaultTheme='dark' storageKey='wazui-theme'>
<App />
</WazUIThemeProvider>
</WazUIQueryProvider>
</React.StrictMode>
);3. Use Components
You can import and use components from the library in your application.
Wazui Components
These are the main components from the @wazobiatech/wazui package.
import { WazUIButton } from '@wazobiatech/wazui';
function MyComponent() {
return <WazUIButton>Click Me</WazUIButton>;
}Shadcn Components
The library also exports Shadcn UI components from a secondary entry point.
import { Button } from '@wazobiatech/wazui/shadcn';
function MyOtherComponent() {
return <Button variant='outline'>Shadcn Button</Button>;
}Available Components
This library exports a wide range of components, hooks, and utilities.
Main Exports (@wazobiatech/wazui)
WazUIButtonWazUIBlogComponentWazUiPostCardWazUiGqlMediaLibraryWazUiCreateBlogContentWazUIBlogDashboardWazUIThemeProvideranduseWazUIThemehookWazUIQueryProvider- And many more...
Shadcn Exports (@wazobiatech/wazui/shadcn)
A large set of UI primitives are available, including:
AlertBadgeButtonCardDialogDropdownMenuInputSheetTable- And many more...
Refer to your Storybook or source code for a complete list of available components and their props.
Contributing
- Create a new branch from
main - Make your changes
- Submit a pull request
- Ensure tests pass and linting is clean
- Get approval from at least two senior engineers
Third-Party Licenses
The components under src/components/shadcn/ (exported via @wazobiatech/wazui/shadcn)
are derived from shadcn/ui, licensed under the
MIT License (Copyright (c) 2023 shadcn). See the NOTICE file for the
full license text.
