A modern, comprehensive React component library built with TypeScript, Tailwind CSS, and designed for creating production-ready web applications with automatic layout generation, powerful form systems, and specialized blockchain components.
- π Live Documentation - Complete component documentation
- π¨ Interactive Storybook - Explore components in action
- π§ Component Examples - See all variations and use cases
Complete application layouts with minimal configuration via ThemeProvider - no manual layout coding required.
Centralized validation powered by React Hook Form with built-in error handling and accessibility.
Specialized components for DeFi applications, NFT marketplaces, and crypto wallets.
6 color presets, dark/light mode, RTL support, and persistent user preferences.
Complete Lucide React integration + 90+ custom-designed icons for comprehensive iconography.
WCAG 2.1 AA compliant components with proper ARIA attributes and keyboard navigation.
Responsive design across all components with support for ultra-wide displays (up to 4K).
Built-in React Router integration for seamless SPA development.
Built on industry-leading libraries for maximum reliability:
- React 18+ - Modern React with hooks and concurrent features
- TypeScript - Full type safety and excellent DX
- Tailwind CSS - Utility-first styling with custom design tokens
- React Hook Form - Performant form handling and validation
- Zustand - Lightweight state management for theming
- Lucide React - Beautiful, consistent icon library
- Framer Motion - Smooth animations and transitions
npm install tucu-ui
Add Tucu UI to your Tailwind config to enable all styling features:
// tailwind.config.js
module.exports = {
content: [
'./src/**/*.{js,ts,jsx,tsx}',
'./node_modules/tucu-ui/**/*.{js,ts,jsx,tsx}', // Add this line
],
// ... rest of your configuration
};
import { Button, Card, Input, Alert } from 'tucu-ui';
function App() {
return (
<Card className="p-6">
<h2 className="text-2xl font-bold mb-4">Welcome to Tucu UI</h2>
<Input placeholder="Enter your name" className="mb-4" />
<Button size="large" className="w-full">
Get Started
</Button>
<Alert variant="success" className="mt-4">
You're ready to build amazing UIs!
</Alert>
</Card>
);
}
import { ThemeProvider, LucideIcons } from 'tucu-ui';
const menuItems = [
{
name: 'Dashboard',
href: '/',
icon: <LucideIcons.Home />,
component: <DashboardPage />,
},
{
name: 'Analytics',
href: '/analytics',
icon: <LucideIcons.BarChart3 />,
component: <AnalyticsPage />,
dropdownItems: [
{
name: 'Reports',
href: '/analytics/reports',
component: <ReportsPage />,
},
{
name: 'Insights',
href: '/analytics/insights',
component: <InsightsPage />,
},
],
},
{
name: 'Settings',
href: '/settings',
icon: <LucideIcons.Settings />,
component: <SettingsPage />,
},
];
function App() {
return (
<ThemeProvider
// Layout Configuration
layout="minimal" // 'classic' | 'minimal' | 'none'
menuItems={menuItems}
logo={{ name: 'My', secondName: 'App' }}
// Theme Configuration
brandColor="Blue" // 'Green' | 'Black' | 'Blue' | 'Red' | 'Purple' | 'Orange'
showSettings={true}
// Additional Features
rightButton={<UserMenu />}
/>
);
}
That's it! Your complete application with routing, navigation, theming, and responsive design is ready.
- Fixed sidebar with expandable navigation
- Header with logo and actions
- Perfect for admin panels and complex applications
- Horizontal navigation bar
- Backdrop blur effects
- Ideal for content-focused applications
- No predefined layout structure
- Perfect for auth pages and custom designs
- β Responsive Design - Mobile drawer, tablet adaptations
- β Dark/Light Mode - Automatic theme switching
- β RTL Support - Full right-to-left language support
- β Brand Colors - 6 predefined color presets
- β Settings Panel - Built-in user customization
- β Routing Integration - Automatic route generation
import { useTheme } from 'tucu-ui';
function ThemeControls() {
const {
mode, // 'light' | 'dark'
layout, // 'classic' | 'minimal' | 'none'
direction, // 'ltr' | 'rtl'
preset, // Current color preset
setMode,
setLayout,
setPreset,
} = useTheme();
return (
<div>
<button onClick={() => setMode(mode === 'light' ? 'dark' : 'light')}>Toggle {mode === 'light' ? 'Dark' : 'Light'} Mode</button>
<button onClick={() => setLayout('classic')}>Switch to Classic Layout</button>
<button onClick={() => setPreset({ label: 'Purple', value: '#9370DB' })}>Purple Theme</button>
</div>
);
}
import { Form, FormField, Input, Textarea, Checkbox, RadioGroup, InputSelect, PinCode, FileInput, Button } from 'tucu-ui';
interface UserFormData {
email: string;
password: string;
country: string;
newsletter: boolean;
}
function UserRegistrationForm() {
const handleSubmit = (data: UserFormData) => {
console.log('Form submitted:', data);
};
return (
<Form<UserFormData>
onSubmit={handleSubmit}
useFormProps={{
defaultValues: {
email: '',
password: '',
country: '',
newsletter: false,
},
mode: 'onChange',
}}
>
<FormField<UserFormData>
name="email"
label="Email Address"
rules={{
required: 'Email is required',
pattern: {
value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,
message: 'Invalid email address',
},
}}
>
<Input type="email" placeholder="Enter your email" />
</FormField>
<FormField<UserFormData>
name="password"
label="Password"
rules={{
required: 'Password is required',
minLength: {
value: 8,
message: 'Password must be at least 8 characters',
},
}}
>
<Input type="password" placeholder="Enter your password" />
</FormField>
<FormField<UserFormData> name="country" label="Country">
<InputSelect
options={[
{ name: 'United States', value: 'us' },
{ name: 'Canada', value: 'ca' },
{ name: 'Mexico', value: 'mx' },
]}
/>
</FormField>
<FormField<UserFormData> name="newsletter" label="Newsletter Subscription">
<Checkbox>Subscribe to our newsletter</Checkbox>
</FormField>
<Button type="submit" size="large" className="w-full">
Create Account
</Button>
</Form>
);
}
// PIN Code Input
<FormField name="verificationCode" label="Verification Code">
<PinCode length={6} type="number" placeholder="-" />
</FormField>
// File Upload with Drag & Drop
<FormField name="documents" label="Upload Documents">
<FileInput
multiple
accept="imgAndPdf"
placeholderText="Drop files here or click to upload"
/>
</FormField>
// Radio Button Groups
<FormField name="subscription" label="Choose Plan">
<RadioGroup
options={[
{ value: 'basic', label: 'Basic - $9/month' },
{ value: 'pro', label: 'Pro - $29/month' },
{ value: 'enterprise', label: 'Enterprise - $99/month' },
]}
direction="vertical"
/>
</FormField>
import { CoinCard, CoinInfoCard, LivePriceFeed, TransactionInfo, CurrencySwapIcons } from 'tucu-ui';
function CryptoPortfolio() {
return (
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{/* Portfolio Balance Cards */}
<CoinCard name="Bitcoin" symbol="BTC" logo="/icons/bitcoin.svg" balance="1.25" usdBalance="45,000" change="+5.2%" isChangePositive={true} color="#FDEDD4" />
{/* Live Price Feed with Chart */}
<LivePriceFeed name="Ethereum" symbol="ETH" icon={<EthereumIcon />} balance="10.5" usdBalance="33,600" change="+2.8%" isChangePositive={true} prices={priceHistory} />
{/* Transaction Details */}
<div className="space-y-3">
<TransactionInfo label="Gas Fee" value="0.002 ETH" />
<TransactionInfo label="Network" value="Ethereum Mainnet" />
<TransactionInfo label="Status" value="Confirmed" />
</div>
</div>
);
}
import { NFTGrid, CollectionCard } from 'tucu-ui';
function NFTGallery() {
return (
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
<NFTGrid author="CryptoArtist" authorImage="/avatars/artist.jpg" image="/nfts/artwork-123.jpg" name="Digital Masterpiece #123" collection="Abstract Collection" price="2.5 ETH" />
<CollectionCard
item={{
name: 'BAYC',
title: 'Bored Ape Yacht Club',
cover_image: '/collections/bayc.jpg',
number_of_artwork: 10000,
user: { name: 'Yuga Labs', avatar: '/avatars/yuga.jpg' },
}}
/>
</div>
);
}
import { LucideIcons } from 'tucu-ui';
function IconShowcase() {
return (
<div className="flex gap-4">
{/* Navigation Icons */}
<LucideIcons.Home className="w-6 h-6" />
<LucideIcons.Settings className="w-6 h-6" />
<LucideIcons.User className="w-6 h-6" />
{/* Action Icons */}
<LucideIcons.Plus className="w-6 h-6 text-green-500" />
<LucideIcons.Trash2 className="w-6 h-6 text-red-500" />
<LucideIcons.Edit className="w-6 h-6 text-blue-500" />
{/* Communication Icons */}
<LucideIcons.Mail className="w-6 h-6" />
<LucideIcons.Phone className="w-6 h-6" />
<LucideIcons.MessageCircle className="w-6 h-6" />
</div>
);
}
import {
// Blockchain/Crypto
Bitcoin,
Ethereum,
Cardano,
// Layout Controls
ClassicLayoutIcon,
MinimalLayoutIcon,
// Navigation
HomeIcon,
SearchIcon,
// Social Brands
Facebook,
Twitter,
Instagram,
Github,
// DeFi Specific
SwapIcon,
ExchangeIcon,
TradingBotIcon,
} from 'tucu-ui';
import { Modal, Drawer, CardContainer, PanelActionCard } from 'tucu-ui';
// Modal with Accessibility
<Modal
isOpen={isOpen}
setIsOpen={setIsOpen}
text={{
title: 'Confirm Action',
content: 'Are you sure you want to proceed?',
button: 'Confirm',
backButton: 'Cancel',
}}
onSubmit={handleConfirm}
/>
// Responsive Drawer
<Drawer
type="sidebar-menu"
isOpen={isDrawerOpen}
setIsOpen={setIsDrawerOpen}
menuItems={menuItems}
position="left"
/>
// Action Cards
<PanelActionCard
title="User Settings"
actions={[
{ label: 'Save', onClick: handleSave },
{ label: 'Cancel', variant: 'ghost', onClick: handleCancel },
]}
>
<UserSettingsForm />
</PanelActionCard>
import { Alert, Toast, useToast } from 'tucu-ui';
// Alert Messages
<Alert variant="success" dismissible>
Your changes have been saved successfully!
</Alert>
<Alert variant="warning">
Your session will expire in 5 minutes.
</Alert>
// Toast Notifications
function ToastExample() {
const { toast } = useToast();
const showToast = () => {
toast({
title: 'Success!',
message: 'Your profile has been updated',
variant: 'success',
});
};
return <Button onClick={showToast}>Show Toast</Button>;
}
import { useBreakpoint, useIsMobile, useCopyToClipboard, useClickAway, useElementSize, useLockBodyScroll } from 'tucu-ui';
function UtilityExample() {
const breakpoint = useBreakpoint();
const isMobile = useIsMobile();
const [copiedText, copy] = useCopyToClipboard();
return (
<div>
<p>Current breakpoint: {breakpoint}</p>
{isMobile && <MobileOnlyComponent />}
<button onClick={() => copy('Hello World!')}>{copiedText ? 'Copied!' : 'Copy Text'}</button>
</div>
);
}
import { SignInForm, SignUpForm, ForgetPasswordForm, ResetPinForm } from 'tucu-ui';
// Complete authentication flow
function AuthPages() {
return (
<ThemeProvider layout="none" menuItems={[]}>
<div className="min-h-screen flex items-center justify-center">
{/* Sign In with validation */}
<SignInForm forgetPasswordPath="/forgot-password" />
{/* Sign Up with terms */}
<SignUpForm />
{/* Password Reset */}
<ForgetPasswordForm onSubmit={handlePasswordReset} resetPinPath="/reset-pin" />
</div>
</ThemeProvider>
);
}
import { ThemeProvider, LucideIcons, useTheme } from 'tucu-ui';
const dashboardMenuItems = [
{
name: 'Overview',
href: '/',
icon: <LucideIcons.LayoutDashboard />,
component: <OverviewPage />,
},
{
name: 'Analytics',
href: '/analytics',
icon: <LucideIcons.BarChart3 />,
component: <AnalyticsPage />,
dropdownItems: [
{
name: 'Reports',
href: '/analytics/reports',
component: <ReportsPage />,
},
{
name: 'Real-time',
href: '/analytics/realtime',
component: <RealtimePage />,
},
],
},
{
name: 'Users',
href: '/users',
icon: <LucideIcons.Users />,
component: <UsersPage />,
},
];
function Dashboard() {
return <ThemeProvider layout="classic" menuItems={dashboardMenuItems} logo={{ name: 'Admin', secondName: 'Panel' }} brandColor="Blue" showSettings={true} rightButton={<UserProfileMenu />} />;
}
import { ThemeProvider, CoinCard, LivePriceFeed, LucideIcons } from 'tucu-ui';
const defiMenuItems = [
{
name: 'Portfolio',
href: '/',
icon: <LucideIcons.Wallet />,
component: <PortfolioPage />,
},
{
name: 'Swap',
href: '/swap',
icon: <LucideIcons.ArrowLeftRight />,
component: <SwapPage />,
},
{
name: 'Staking',
href: '/staking',
icon: <LucideIcons.Coins />,
component: <StakingPage />,
},
];
function DeFiApp() {
return <ThemeProvider layout="minimal" menuItems={defiMenuItems} logo={{ name: 'DeFi', secondName: 'Portfolio' }} brandColor="Green" rightButton={<WalletConnector />} />;
}
import { ThemeProvider, LucideIcons, Form, FormField, Input } from 'tucu-ui';
const ecommerceMenuItems = [
{
name: 'Products',
href: '/products',
icon: <LucideIcons.Package />,
component: <ProductsPage />,
},
{
name: 'Orders',
href: '/orders',
icon: <LucideIcons.ShoppingCart />,
component: <OrdersPage />,
},
{
name: 'Customers',
href: '/customers',
icon: <LucideIcons.Users />,
component: <CustomersPage />,
},
];
function EcommerceAdmin() {
return <ThemeProvider layout="classic" menuItems={ecommerceMenuItems} logo={{ name: 'Shop', secondName: 'Admin' }} brandColor="Purple" showSettings={true} />;
}
:root {
--color-brand: 42 82 190; /* RGB values for alpha support */
/* Tucu UI will automatically use your brand colors */
}
// tailwind.config.js
module.exports = {
content: ['./src/**/*.{js,ts,jsx,tsx}', './node_modules/tucu-ui/**/*.{js,ts,jsx,tsx}'],
theme: {
extend: {
colors: {
brand: {
DEFAULT: 'rgb(var(--color-brand) / <alpha-value>)',
50: '#eff6ff',
// ... more shades
},
},
spacing: {
13: '3.375rem', // Custom spacing used by Tucu UI
},
},
},
};
Tucu UI is built with accessibility in mind:
- β WCAG 2.1 AA Compliance - Meeting accessibility standards
- β Keyboard Navigation - Full keyboard support across components
- β Screen Reader Support - Proper ARIA attributes and semantic HTML
- β Focus Management - Visible focus indicators and logical tab order
- β Color Contrast - Sufficient contrast ratios in all themes
- β Motion Preferences - Respects user's motion preferences
# Clone the repository
git clone <repository-url>
# Install dependencies
npm install
# Run Storybook for development
npm run tucu-ui
# Build the library
npm run tucu-ui:build
# Run tests
npm test
tucu-ui/
βββ apps/
β βββ demo/ # Demo application
βββ ui/
β βββ tucu-ui/ # Main library
β βββ src/
β β βββ components/ # All UI components
β β βββ hooks/ # Utility hooks
β β βββ themes/ # Theme system
β β βββ storybook/ # Documentation
β βββ package.json
βββ nx.json # Nx configuration
MIT License - feel free to use in your projects!
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new features
- Update documentation
- Submit a pull request
- π Documentation - Complete guides and examples
- π¨ Storybook - Interactive component explorer
- π Issues - Report bugs and request features
- π¬ Discussions - Community support and ideas
Tucu UI - Build beautiful, accessible, and production-ready React applications with confidence.
Perfect for dashboards, e-commerce platforms, DeFi applications, and any modern web application that demands quality and consistency.