UI Overview
Welcome to the Wrkbelt UI documentation. Our component library is built with React and styled using Tailwind CSS, providing a beautiful and consistent user experience across the platform.
Core Concepts
- Component-First - Modular, reusable components as building blocks
- Accessibility - WCAG 2.1 compliant with full keyboard navigation
- Customization - Flexible theming system that adapts to your brand
- Performance - Optimized bundle size and runtime performance
Key Sections
Pages
Complete page implementations:
- Landing Pages
- Dashboard
- Settings
- Authentication
- Error Pages
Libraries
Shared UI utilities and helpers:
- Form Validation
- Date Handling
- Formatting
- Analytics
- Error Tracking
Key UX Flows
End-to-end user experiences:
- Onboarding
- Scheduling
- Payment Processing
- Account Management
- Settings Configuration
Patterns
Common UI patterns and best practices:
- Form Handling
- Error States
- Loading States
- Responsive Design
- Accessibility
Theming
Common UI patterns and best practices:
- Form Validation
- Error Handling
- Loading States
- Responsive Design
- Animation Guidelines
Getting Started
-
Environment Setup
# Install dependencies
pnpm install
# Set up environment
cp apps/ui/.env.example apps/ui/.env -
Start Development Server
# Start the UI development server
nx run ui:serveThe UI will be available at http://localhost:4200
-
Using Components
import {
Button,
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
Input,
Label,
cn,
} from '@wrkbelt/ui-components';
function MyComponent() {
return (
<Card>
<CardHeader>
<CardTitle>Welcome</CardTitle>
<CardDescription>Get started with our platform</CardDescription>
</CardHeader>
<CardContent>
<div className="space-y-6">
<div className="grid gap-2">
<Label htmlFor="name">Name</Label>
<Input
id="name"
placeholder="John Doe"
className={cn(
'w-full',
errors?.name && 'border-destructive focus-visible:ring-destructive'
)}
/>
</div>
<Button>
Get Started
</Button>
</div>
</CardContent>
</Card>
);
}tipOur components are built using ShadCN as a foundation, with additional customization and functionality added through our
@wrkbelt/ui-componentslibrary. This provides a consistent design system while maintaining flexibility. -
Running Tests
# Run UI tests
nx run ui:test
# Run UI tests with coverage
nx run ui:test --coverage
# Run UI tests in watch mode
nx run ui:test --watch